[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr 2257f3a746: Revert "Remove embark glue code from tm
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr 2257f3a746: Revert "Remove embark glue code from tmr.el and put it in the manual" |
Date: |
Tue, 5 Nov 2024 00:58:54 -0500 (EST) |
branch: externals/tmr
commit 2257f3a7468aaf120f94302b87304f51394a3d8e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Revert "Remove embark glue code from tmr.el and put it in the manual"
This reverts commit 9a8a9d9b6203a6adbeb7661a14715261d7db5ed9.
Thanks to Daniel Mendler for explaining that integration code is best
provided automatically:
<https://github.com/protesilaos/tmr/commit/9a8a9d9b6203a6adbeb7661a14715261d7db5ed9#commitcomment-148572312>.
---
README.org | 30 ++++--------------------------
tmr.el | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/README.org b/README.org
index fa42c0d49d..69c7ff8f12 100644
--- a/README.org
+++ b/README.org
@@ -383,32 +383,10 @@ Everything is in place to set up the package.
:CUSTOM_ID: h:64711ce4-c023-4f6e-b9aa-b43942013423
:END:
-The ~embark~ package provides standards-compliant infrastructure to
-run context-dependent actions on all sorts of targets (symbol at
-point, current completion candidate, etc.). Users can use the
-following glue code to make TMR timer objects recognisable by Embark.
-
-#+begin_src emacs-lisp
-(defvar-keymap embark-tmr-action-map
- :doc "Action map for TMRs, which can be utilized by Embark."
- "k" #'tmr-remove
- "r" #'tmr-remove
- "R" #'tmr-remove-finished
- "c" #'tmr-clone
- "a" #'tmr-toggle-acknowledge
- "e" #'tmr-edit-description
- "s" #'tmr-reschedule)
-
-(defvar embark-keymap-alist)
-(defvar embark-post-action-hooks)
-
-(with-eval-after-load 'embark
- (add-to-list 'embark-keymap-alist '(tmr-timer . embark-tmr-action-map))
- (cl-loop
- for cmd the key-bindings of embark-tmr-action-map
- if (commandp cmd) do
- (add-to-list 'embark-post-action-hooks (list cmd 'embark--restart))))
-#+end_src
+The =embark= package provides standards-compliant infrastructure to run
+context-dependent actions on all sorts of targets (symbol at point, current
+completion candidate, etc.). TMR is set up to make its timer objects
+recognisable by Embark and registers the ~tmr-action-map~ in Embark.
* Acknowledgements
:PROPERTIES:
diff --git a/tmr.el b/tmr.el
index d27add95b9..e3d300a50c 100644
--- a/tmr.el
+++ b/tmr.el
@@ -819,6 +819,27 @@ This map should be bound to a global prefix key."
"e" #'tmr-edit-description
"s" #'tmr-reschedule)
+;;;;; Integration with the `embark' package
+
+(defvar-keymap tmr-action-map
+ :doc "Action map for TMRs, which can be utilized by Embark."
+ "k" #'tmr-remove
+ "r" #'tmr-remove
+ "R" #'tmr-remove-finished
+ "c" #'tmr-clone
+ "a" #'tmr-toggle-acknowledge
+ "e" #'tmr-edit-description
+ "s" #'tmr-reschedule)
+
+(defvar embark-keymap-alist)
+(defvar embark-post-action-hooks)
+(with-eval-after-load 'embark
+ (add-to-list 'embark-keymap-alist '(tmr-timer . tmr-action-map))
+ (cl-loop
+ for cmd the key-bindings of tmr-action-map
+ if (commandp cmd) do
+ (add-to-list 'embark-post-action-hooks (list cmd 'embark--restart))))
+
;;;; Ask if there are timers before exiting Emacs
(defun tmr-kill-emacs-query-function ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/tmr 2257f3a746: Revert "Remove embark glue code from tmr.el and put it in the manual",
ELPA Syncer <=