From 47401a1e10213d89cbdb6eaa2b66b44c2be37dfe Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 26 Apr 2020 10:47:17 +0200 Subject: [PATCH 4/4] Improve the display-time-world UI * lisp/time.el (display-time-world-buffer-name): Change default buffer name. (display-time-world): Add usage instructions to modeline. (world-clock): New defalias for 'display-time-world'. --- lisp/time.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/time.el b/lisp/time.el index 84c0071b7d..18de3990c3 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -195,11 +195,11 @@ display-time-world-time-format :type 'string :version "23.1") -(defcustom display-time-world-buffer-name "*wclock*" +(defcustom display-time-world-buffer-name "*World Clock*" "Name of the world clock buffer." :group 'display-time :type 'string - :version "23.1") + :version "28.1") (defcustom display-time-world-timer-enable t "If non-nil, a timer will update the world clock." @@ -570,7 +570,11 @@ display-time-world (display-time-world-display (time--display-world-list)) (display-buffer display-time-world-buffer-name (cons nil '((window-height . fit-window-to-buffer)))) - (display-time-world-mode)) + (display-time-world-mode) + (setq mode-line-format (format "%15s %13s" "World Clock" "q to quit"))) + +;; This would be a more intuitive name. +(defalias 'world-clock 'display-time-world) (defun display-time-world-timer () (if (get-buffer display-time-world-buffer-name) -- 2.26.2