[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr 92d6163dd0 10/14: Remove no-hooks argument
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr 92d6163dd0 10/14: Remove no-hooks argument |
Date: |
Mon, 27 Jun 2022 12:58:04 -0400 (EDT) |
branch: externals/tmr
commit 92d6163dd0fd66649636f315176213189d1b86da
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Remove no-hooks argument
It is better to instead let bind the dynamic hook variables.
---
tmr-tabulated.el | 14 ++++++--------
tmr.el | 14 +++++---------
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index 35d9254ab0..10d0d5d844 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -82,14 +82,12 @@
(add-hook 'tabulated-list-revert-hook #'tmr-tabulated--set-entries nil t)
(tabulated-list-init-header))
-(defun tmr-tabulated-cancel (timer &optional no-hooks)
+(defun tmr-tabulated-cancel (timer)
"Stop TIMER and remove it from the list.
-Interactively, use the timer at point.
-
-Optional NO-HOOKS has the same meaning as in `tmr-cancel'."
- (interactive (list (tmr-tabulated--get-timer-at-point) current-prefix-arg))
+Interactively, use the timer at point."
+ (interactive (list (tmr-tabulated--get-timer-at-point)))
(tmr-tabulated--move-point-to-closest-entry)
- (tmr-cancel timer no-hooks))
+ (tmr-cancel timer))
(defun tmr-tabulated-clone (timer)
"Create a new timer by cloning TIMER.
@@ -105,8 +103,8 @@ If TIMER has a description, prompt for one. Otherwise only
prompt for a duration."
(interactive (list (tmr-tabulated--get-timer-at-point)))
(tmr-clone timer :prompt)
- ;; Cancel the old timer
- (tmr-tabulated-cancel timer :no-hooks))
+ (let (tmr-timer-cancelled-functions)
+ (tmr-tabulated-cancel timer)))
(defun tmr-tabulated-rewrite-description (timer description)
"Change TIMER description with that of DESCRIPTION."
diff --git a/tmr.el b/tmr.el
index e43a6a38fa..2aaa412113 100644
--- a/tmr.el
+++ b/tmr.el
@@ -205,21 +205,17 @@ Populated by `tmr' and then operated on by `tmr-cancel'.")
(cl-find creation-date tmr--timers :key #'tmr--timer-creation-date))
;;;###autoload
-(defun tmr-cancel (timer &optional no-hooks)
+(defun tmr-cancel (timer)
"Cancel TIMER object set with `tmr' command.
Interactively, let the user choose which timer to cancel with
-completion.
-
-With optional NO-HOOKS refrain from calling
-`tmr-timer-cancelled-functions'."
- (interactive (list (tmr--read-timer :active) current-prefix-arg))
+completion."
+ (interactive (list (tmr--read-timer :active)))
(if (not timer)
(user-error "No `tmr' to cancel")
(cancel-timer (tmr--timer-timer-object timer))
(setq tmr--timers (delete timer tmr--timers))
- (unless no-hooks
- (run-hooks 'tmr--update-hook)
- (run-hook-with-args 'tmr-timer-cancelled-functions timer))))
+ (run-hooks 'tmr--update-hook)
+ (run-hook-with-args 'tmr-timer-cancelled-functions timer)))
;;;###autoload
(defun tmr-remove-finished ()
- [elpa] externals/tmr cfd798b066 11/14: Add tmr-reschedule and tmr-edit-description, (continued)
- [elpa] externals/tmr cfd798b066 11/14: Add tmr-reschedule and tmr-edit-description, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 907756ce8d 14/14: Acknowledge Daniel Mendler for the latest patches, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 448be30775 09/14: Improve tmr-clone: Only prompt for description if pressing C-u C-u, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 6f3b096f2c 13/14: Greatly simplify tmr-tabulated, reuse tmr--read-timer, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 58d30c4896 12/14: Remove single line functions which were used only once, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 58224191d0 01/14: Rename struct tmr-timer to tmr--timer, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr e18496d187 07/14: Add tmr--update-hook, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr e9c6c8861f 02/14: Get rid of tmr-descriptions-list, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 9974a28933 04/14: Remove unnecessary declare-function, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr d6d5e4d22d 05/14: Warn if dbus is unavailable, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 92d6163dd0 10/14: Remove no-hooks argument,
ELPA Syncer <=