diff options
| author | Eli Zaretskii | 2020-03-25 16:18:37 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2020-03-25 16:18:37 +0200 |
| commit | 74489bdcb663722b1747f6a3f81f1f111c751f04 (patch) | |
| tree | a7ac6cfff8aaf215c0ed8ced812bf0489defec11 | |
| parent | b85d29f4fd555eda34ffba5b9a6006b5758e2955 (diff) | |
| download | emacs-74489bdcb663722b1747f6a3f81f1f111c751f04.tar.gz emacs-74489bdcb663722b1747f6a3f81f1f111c751f04.zip | |
Improve the UI of 'list-timers'
* lisp/emacs-lisp/timer-list.el (list-timers): Display both "Next"
and "Repeat" in units of seconds, for consistency.
(timer-list-mode): Add help-echo to column headers.
| -rw-r--r-- | lisp/emacs-lisp/timer-list.el | 15 | ||||
| -rw-r--r-- | lisp/ls-lisp.el | 6 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index 4fa31f32673..4cebd739c3b 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | (let ((repeat (aref timer 4))) | 52 | (let ((repeat (aref timer 4))) |
| 53 | (cond | 53 | (cond |
| 54 | ((numberp repeat) | 54 | ((numberp repeat) |
| 55 | (format "%.2f" (/ repeat 60))) | 55 | (format "%.1f" repeat)) |
| 56 | ((null repeat) | 56 | ((null repeat) |
| 57 | "-") | 57 | "-") |
| 58 | (t | 58 | (t |
| @@ -91,7 +91,18 @@ | |||
| 91 | (setq header-line-format | 91 | (setq header-line-format |
| 92 | (concat (propertize " " 'display '(space :align-to 0)) | 92 | (concat (propertize " " 'display '(space :align-to 0)) |
| 93 | (format "%4s %10s %8s %s" | 93 | (format "%4s %10s %8s %s" |
| 94 | "Idle" "Next" "Repeat" "Function")))) | 94 | (propertize "Idle" |
| 95 | 'mouse-face 'highlight | ||
| 96 | 'help-echo "* marks idle timers") | ||
| 97 | (propertize "Next" | ||
| 98 | 'mouse-face 'highlight | ||
| 99 | 'help-echo "Time in sec till next invocation") | ||
| 100 | (propertize "Repeat" | ||
| 101 | 'mouse-face 'highlight | ||
| 102 | 'help-echo "Symbol: repeat; number: repeat interval in sec") | ||
| 103 | (propertize "Function" | ||
| 104 | 'mouse-face 'highlight | ||
| 105 | 'help-echo "Function called by timer"))))) | ||
| 95 | 106 | ||
| 96 | (defun timer-list-cancel () | 107 | (defun timer-list-cancel () |
| 97 | "Cancel the timer on the line under point." | 108 | "Cancel the timer on the line under point." |
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 2952242c251..8851522bbdb 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -435,9 +435,9 @@ not contain `d', so that a full listing is expected." | |||
| 435 | ;; text. But if the listing is empty, as e.g. in empty | 435 | ;; text. But if the listing is empty, as e.g. in empty |
| 436 | ;; directories with -a removed from switches, point will be | 436 | ;; directories with -a removed from switches, point will be |
| 437 | ;; before the inserted text, and dired-insert-directory will | 437 | ;; before the inserted text, and dired-insert-directory will |
| 438 | ;; not indent the listing correctly. Going to the end of the | 438 | ;; not indent the listing correctly. Getting past the |
| 439 | ;; buffer fixes that. | 439 | ;; inserted text solves this. |
| 440 | (unless files (goto-char (point-max))) | 440 | (unless (cdr total-line) (forward-line 2)) |
| 441 | (if (memq ?R switches) | 441 | (if (memq ?R switches) |
| 442 | ;; List the contents of all directories recursively. | 442 | ;; List the contents of all directories recursively. |
| 443 | ;; cadr of each element of `file-alist' is t for | 443 | ;; cadr of each element of `file-alist' is t for |