emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tmr c469645590 2/6: Reintroduce tmr-description-list


From: ELPA Syncer
Subject: [elpa] externals/tmr c469645590 2/6: Reintroduce tmr-description-list
Date: Mon, 27 Jun 2022 23:58:03 -0400 (EDT)

branch: externals/tmr
commit c4696455902316e99f2361ab929b07dc109cf78f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Reintroduce tmr-description-list
---
 tmr.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/tmr.el b/tmr.el
index 9b63d4e176..7cd602762e 100644
--- a/tmr.el
+++ b/tmr.el
@@ -42,6 +42,12 @@
   "TMR May Ring: set timers using a simple notation."
   :group 'data)
 
+(defcustom tmr-description-list 'tmr--description-hist
+  "List of timer description presets.
+The variable can either be a variable symbol or
+a list of strings."
+  :type '(choice symbol (repeat string)))
+
 (defcustom tmr-sound-file
   "/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"
   "Path to sound file used by `tmr-sound-play'.
@@ -314,8 +320,11 @@ If optional DEFAULT is provided use it as a default 
candidate."
      (if (eq action 'metadata)
          `(metadata (display-sort-function . ,#'identity)
                     (cycle-sort-function . ,#'identity))
-       (complete-with-action
-        action tmr--description-hist string predicate)))
+       (complete-with-action action
+                             (if (listp tmr-description-list)
+                                 tmr-description-list
+                               (symbol-value tmr-description-list))
+                             string predicate)))
    nil nil nil
    'tmr--description-hist default))
 
@@ -335,7 +344,7 @@ special final character denoting a unit of time: 'h' for 
'hours',
 's' for 'seconds'.
 
 With optional DESCRIPTION as a prefix (\\[universal-argument]),
-prompt for a description among `tmr-descriptions-list', though
+prompt for a description among `tmr-description-list', though
 allow for any string to serve as valid input.
 
 This command also plays back `tmr-sound-file' if it is available.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]