diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-10-31 15:00:00 +0000 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-10-31 15:00:00 +0000 |
commit | f7f5d59ab4c4cc1a7db46d7f1d462655254e1a87 (patch) | |
tree | 33b8af817af32d9414fe3aa08f22c4ce2aa4dc38 /lisp/emacs-lisp/timer-list.el | |
parent | fd9e9308d27138a16e2e93417bd7ad4448fea40a (diff) | |
parent | 283b8d274bd54192b3876ce8bf2930a096391839 (diff) | |
download | emacs-f7f5d59ab4c4cc1a7db46d7f1d462655254e1a87.tar.gz emacs-f7f5d59ab4c4cc1a7db46d7f1d462655254e1a87.tar.bz2 emacs-f7f5d59ab4c4cc1a7db46d7f1d462655254e1a87.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/timer-list.el')
-rw-r--r-- | lisp/emacs-lisp/timer-list.el | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index 00d09696d2a..4bda9acebf7 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el @@ -49,23 +49,25 @@ (let ((time (list (aref timer 1) (aref timer 2) (aref timer 3)))) - (format "%10.2f" - (float-time - (if (aref timer 7) - time - (time-subtract time nil))))) - 'help-echo "Time in sec till next invocation") + (format "%12s" + (format-seconds "%dd %hh %mm %z%,1ss" + (float-time + (if (aref timer 7) + time + (time-subtract time nil)))))) + 'help-echo "Time until next invocation") ;; Repeat. - ,(propertize - (let ((repeat (aref timer 4))) - (cond - ((numberp repeat) - (format "%8.1f" repeat)) - ((null repeat) - " -") - (t - (format "%8s" repeat)))) - 'help-echo "Symbol: repeat; number: repeat interval in sec") + ,(let ((repeat (aref timer 4))) + (cond + ((numberp repeat) + (propertize + (format "%12s" (format-seconds + "%dd %hh %mm %z%,1ss" repeat)) + 'help-echo "Repeat interval")) + ((null repeat) + (propertize " -" 'help-echo "Runs once")) + (t + (format "%12s" repeat)))) ;; Function. ,(propertize (let ((cl-print-compiled 'static) @@ -93,8 +95,8 @@ (setq-local revert-buffer-function #'list-timers) (setq tabulated-list-format '[("Idle" 6 timer-list--idle-predicate) - (" Next" 12 timer-list--next-predicate) - (" Repeat" 11 timer-list--repeat-predicate) + (" Next" 12 timer-list--next-predicate) + (" Repeat" 12 timer-list--repeat-predicate) ("Function" 10 timer-list--function-predicate)])) (defun timer-list--idle-predicate (A B) |