[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr d8071f7476 7/7: Use let bound variable in tmr--read
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr d8071f7476 7/7: Use let bound variable in tmr--read-timer |
Date: |
Wed, 11 May 2022 04:57:56 -0400 (EDT) |
branch: externals/tmr
commit d8071f74761c6b9b30f55f5598b89a4b2f4ec47d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Use let bound variable in tmr--read-timer
---
tmr.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/tmr.el b/tmr.el
index 1296d08290..39b8705af2 100644
--- a/tmr.el
+++ b/tmr.el
@@ -277,17 +277,18 @@ completion."
(setq tmr--timers (cl-delete timer tmr--timers))))
(defun tmr--read-timer ()
- "Let the user choose a timer among all timers. Return the selected timer.
-If there is a single timer, use that. If there are multiple
-timers, prompt for one with completion. If there are no timers,
-return nil."
- (cond
- ((= (length tmr--timers) 1)
- (car timers))
- ((> (length tmr--timers) 1)
- (let* ((timer-descriptions (mapcar #'tmr--long-description tmr--timers))
- (selection (completing-read "Timer: " timer-descriptions nil t)))
- (cl-find selection tmr--timers :test #'string= :key
#'tmr--long-description)))))
+ "Let the user choose a timer among all timers.
+Return the selected timer. If there is a single timer, use that.
+If there are multiple timers, prompt for one with completion. If
+there are no timers, return nil."
+ (let ((timers tmr--timers))
+ (cond
+ ((= (length timers) 1)
+ (car timers))
+ ((> (length timers) 1)
+ (let* ((timer-descriptions (mapcar #'tmr--long-description timers))
+ (selection (completing-read "Timer: " timer-descriptions nil t)))
+ (cl-find selection timers :test #'string= :key
#'tmr--long-description))))))
(defun tmr--echo-area (time &optional description)
"Produce `message' for current `tmr' TIME.
- [elpa] externals/tmr updated (4bf30baacb -> d8071f7476), ELPA Syncer, 2022/05/11
- [elpa] externals/tmr 41c44c2154 3/7: tmr-tabulated: Bind "k" to the new tmr-tabulated-cancel command, ELPA Syncer, 2022/05/11
- [elpa] externals/tmr 81aa6ce65c 6/7: Use forward-line instead of {next, previous}-line, ELPA Syncer, 2022/05/11
- [elpa] externals/tmr 15089d145e 2/7: tmr-tabulated: Add documentation to the Commentary section, ELPA Syncer, 2022/05/11
- [elpa] externals/tmr b240741a14 4/7: Add Damien Cassou as author, ELPA Syncer, 2022/05/11
- [elpa] externals/tmr 4d8c70530c 1/7: tmr-cancel: Fix, ELPA Syncer, 2022/05/11
- [elpa] externals/tmr d8071f7476 7/7: Use let bound variable in tmr--read-timer,
ELPA Syncer <=
- [elpa] externals/tmr 90526a0310 5/7: Fix placement of comma for Authors, ELPA Syncer, 2022/05/11