summaryrefslogtreecommitdiff
path: root/lisp/time.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/time.el')
-rw-r--r--lisp/time.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/time.el b/lisp/time.el
index 9f25f99a149..b67315cf630 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -340,10 +340,10 @@ Switches from the 1 to 5 to 15 minute load average, and then back to 1."
(float-time end-time))))))))))
(defun display-time-update ()
- "Update the display-time info for the mode line.
+ "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))
@@ -526,11 +526,9 @@ If the value is t instead of an alist, use the value of
'((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.
@@ -626,7 +624,7 @@ point."
;;;###autoload
(defun emacs-init-time (&optional format)
"Return a string giving the duration of the Emacs initialization.
-FORMAT is a string to format the result, using `format'. If nil,
+FORMAT is a string to format the result, using `format'. If nil,
the default format \"%f seconds\" is used."
(interactive)
(let ((str (format (or format "%f seconds")