[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr 71f34405cb 4/7: tmr--read-timer: Add PROMPT argumen
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr 71f34405cb 4/7: tmr--read-timer: Add PROMPT argument |
Date: |
Wed, 29 Jun 2022 07:58:00 -0400 (EDT) |
branch: externals/tmr
commit 71f34405cba4e435da95c28d514615350494f887
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>
tmr--read-timer: Add PROMPT argument
---
tmr.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tmr.el b/tmr.el
index 3a6cc87010..f83fd28d0d 100644
--- a/tmr.el
+++ b/tmr.el
@@ -222,7 +222,7 @@ Populated by `tmr' and then operated on by `tmr-cancel'.")
"Cancel and remove TIMER object set with `tmr' command.
Interactively, let the user choose which timer to cancel with
completion."
- (interactive (list (tmr--read-timer)))
+ (interactive (list (tmr--read-timer "Remove timer: ")))
(cancel-timer (tmr--timer-timer-object timer))
(setq tmr--timers (delete timer tmr--timers))
(run-hooks 'tmr--update-hook)
@@ -234,7 +234,7 @@ completion."
Interactively, let the user choose which timer to cancel with
completion. This command is the same as `tmr-remove' but
chooses only among active timers."
- (interactive (list (tmr--read-timer :active)))
+ (interactive (list (tmr--read-timer "Cancel timer: " :active)))
(tmr-remove timer))
;;;###autoload
@@ -242,7 +242,7 @@ chooses only among active timers."
"Reschedule TIMER.
This is the same as cloning it, prompting for duration and
cancelling the original one."
- (interactive (list (tmr--read-timer)))
+ (interactive (list (tmr--read-timer "Reschedule timer: ")))
(tmr-clone timer :prompt)
(let (tmr-timer-cancelled-functions)
(tmr-cancel timer)))
@@ -252,7 +252,7 @@ cancelling the original one."
"Change TIMER description with that of DESCRIPTION."
(interactive
(list
- (tmr--read-timer)
+ (tmr--read-timer "Edit description of timer: ")
(tmr--description-prompt)))
(setf (tmr--timer-description timer) description)
(run-hooks 'tmr--update-hook))
@@ -274,13 +274,13 @@ cancelling the original one."
" (finished)"
(format " (%s remaining)" (tmr--format-remaining timer))))
-(defun tmr--read-timer (&optional active)
+(defun tmr--read-timer (prompt &optional active)
"Let the user choose a timer among all (or ACTIVE) timers.
Return the selected timer. If there is a single timer and
`tmr-confirm' is nil, use that. If there are multiple timers,
-prompt for one with completion. If there are no timers, throw an
-error."
+prompt for one with completion with PROMPT text. If there are no
+timers, throw an error."
(or
(run-hook-with-args-until-success 'tmr--read-timer-hook)
(pcase
@@ -298,7 +298,7 @@ error."
timers))
(selected
(car (member (completing-read
- "Timer: "
+ prompt
(tmr--completion-table
timer-list 'tmr-timer #'tmr--timer-annotation)
nil t)
@@ -434,7 +434,7 @@ argument, ask for a description as well.
Without a PROMPT, clone TIMER outright."
(interactive
(list
- (tmr--read-timer nil)
+ (tmr--read-timer "Clone timer: ")
current-prefix-arg))
(tmr
(if prompt
- [elpa] externals/tmr updated (aa521d5ce6 -> 7fae717b1b), ELPA Syncer, 2022/06/29
- [elpa] externals/tmr 88a16c9ac5 2/7: Add tmr-remove for uniformity with other commands, ELPA Syncer, 2022/06/29
- [elpa] externals/tmr fb57e9163f 3/7: Add tmr-confirm configuration option, ELPA Syncer, 2022/06/29
- [elpa] externals/tmr b1aa243d90 1/7: Fix completion table, handle null completion, ELPA Syncer, 2022/06/29
- [elpa] externals/tmr 71f34405cb 4/7: tmr--read-timer: Add PROMPT argument,
ELPA Syncer <=
- [elpa] externals/tmr 7fae717b1b 7/7: Remove unused macros from README.org, ELPA Syncer, 2022/06/29
- [elpa] externals/tmr 4ea7d30ef4 5/7: Update documentation to reflect current state, ELPA Syncer, 2022/06/29
- [elpa] externals/tmr 323da8d075 6/7: Make the README.org metadata easier to read, ELPA Syncer, 2022/06/29