[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr 507e49a150 3/5: tmr--description-prompt: Remove man
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr 507e49a150 3/5: tmr--description-prompt: Remove manual support for default |
Date: |
Tue, 17 May 2022 04:57:58 -0400 (EDT) |
branch: externals/tmr
commit 507e49a150ff9b9bf36edc8c32824e4fdc4aafbb
Author: Damien Cassou <damien@cassou.me>
Commit: Protesilaos Stavrou <info@protesilaos.com>
tmr--description-prompt: Remove manual support for default
We shouldn't reimplement how `completing-read` takes care of its
default value. https://github.com/minad/vertico/issues/228
---
tmr.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tmr.el b/tmr.el
index 29fe000e20..85fc08d900 100644
--- a/tmr.el
+++ b/tmr.el
@@ -285,13 +285,12 @@ If DEFAULT is provided, use that as a default."
If optional DEFAULT is provided use it as a default. Otherwise
use the latest input from the `tmr--description-hist', if
present."
- (let ((def (or default (nth 0 tmr--description-hist))))
- (completing-read
- (if def
- (format "Description for this tmr [%s]: " def)
- "Description for this tmr: ")
- tmr-descriptions-list nil nil nil
- 'tmr--description-hist def)))
+ (completing-read
+ (if default
+ (format "Description for this tmr [%s]: " default)
+ "Description for this tmr: ")
+ tmr-descriptions-list nil nil nil
+ 'tmr--description-hist default))
(defun tmr--complete (timer)
"Mark TIMER as completed and execute `tmr-timer-completed-functions'."