branch: externals/tmr
commit b762fc67f35d99338fc6a4e706218e92260213cf
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make stylistic change to tmr--format-remaining
---
tmr.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tmr.el b/tmr.el
index 06c81933f7..db7fd5b038 100644
--- a/tmr.el
+++ b/tmr.el
@@ -409,15 +409,19 @@ optional `tmr--timer-description'."
(defun tmr--format-remaining (timer)
"Format remaining time of TIMER."
- (if (tmr--timer-finishedp timer)
- tmr-finished-indicator
+ (cond
+ ((tmr--timer-finishedp timer)
+ tmr-finished-indicator)
+ ((when-let* ((remaining (tmr--timer-paused-remaining timer)))
+ (tmr--format-seconds remaining)))
+ (t
(let* ((seconds (tmr--get-seconds timer))
(str (tmr--format-seconds seconds)))
(if (< seconds 0)
;; Negative remaining time occurs for non-acknowledged timers with
;; additional duration.
(propertize str 'face 'tmr-must-be-acknowledged)
- str))))
+ str)))))
(defun tmr--format-duration (timer)
"Format duration of TIMER."