diff options
Diffstat (limited to 'lisp/time.el')
-rw-r--r-- | lisp/time.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/time.el b/lisp/time.el index 29216416d9d..e7066cae7a5 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -93,7 +93,7 @@ Non-nil means \\[display-time] should display day and date as well as time." (defcustom display-time-interval 60 "Seconds between updates of time in the mode line." - :type 'integer) + :type 'natnum) (defcustom display-time-24hr-format nil "Non-nil indicates time should be displayed as hh:mm, 0 <= hh <= 23. @@ -343,7 +343,7 @@ Switches from the 1 to 5 to 15 minute load average, and then back to 1." "Update the `display-time' info for the mode line. However, don't redisplay right now. -This is used for things like Rmail `g' that want to force an +This is used for things like Rmail \\`g' that want to force an update which can wait for the next redisplay." (let* ((now (current-time)) (time (current-time-string now)) @@ -355,7 +355,7 @@ update which can wait for the next redisplay." (am-pm (if (>= hour 12) "pm" "am")) (minutes (substring time 14 16)) (seconds (substring time 17 19)) - (time-zone (car (cdr (current-time-zone now)))) + (time-zone (format-time-string "%Z" now)) (day (substring time 8 10)) (year (format-time-string "%Y" now)) (monthname (substring time 4 7)) @@ -519,18 +519,16 @@ If the value is t instead of an alist, use the value of (defcustom world-clock-timer-second 60 "Interval in seconds for updating the `world-clock' buffer." - :type 'integer + :type 'natnum :version "28.1") (defface world-clock-label '((t :inherit font-lock-variable-name-face)) "Face for time zone label in `world-clock' buffer.") -(defvar world-clock-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "n" #'next-line) - (define-key map "p" #'previous-line) - map)) +(defvar-keymap world-clock-mode-map + "n" #'next-line + "p" #'previous-line) (define-derived-mode world-clock-mode special-mode "World clock" "Major mode for buffer that displays times in various time zones. |