branch: externals/tmr
commit af93f7677d5228e430adbf0cf2b3e9cfa4a2b38a
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Replace hardcoded string for finished timers with a user option
---
 tmr-tabulated.el | 2 +-
 tmr.el           | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index a524a25ff1..c6ed052a3c 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -58,7 +58,7 @@
         (vector (tmr--format-creation-date timer)
                 (tmr--format-end-date timer)
                 (tmr--format-remaining timer)
-                (if (tmr--timer-acknowledgep timer) "✔" "")
+                (if (tmr--timer-acknowledgep timer) tmr-finished-indicator "")
                 (or (tmr--timer-description timer) ""))))
 
 (defvar-keymap tmr-tabulated-mode-map
diff --git a/tmr.el b/tmr.el
index ceb55b00bc..be7358dc81 100644
--- a/tmr.el
+++ b/tmr.el
@@ -125,6 +125,11 @@ Each function must accept a timer as argument."
 Each function must accept a timer as argument."
   :type 'hook)
 
+(defcustom tmr-finished-indicator "✔"
+  "Indicator for a finished timer."
+  :package-version '(tmr . "1.0.0")
+  :type 'string)
+
 (cl-defstruct (tmr--timer
                (:constructor tmr--timer-create)
                (:copier tmr--timer-copy))
@@ -213,7 +218,7 @@ optional `tmr--timer-description'."
 (defun tmr--format-remaining (timer)
   "Format remaining time of TIMER."
   (if (tmr--timer-finishedp timer)
-      "✔"
+      tmr-finished-indicator
     (let* ((secs (round (- (float-time (tmr--timer-end-date timer))
                            (float-time))))
            (str (if (> secs 3600)

Reply via email to