aboutsummaryrefslogtreecommitdiffstats
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, 15 insertions, 1 deletions
diff --git a/lisp/time.el b/lisp/time.el
index c78a51e9f97..f553ebab413 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -177,6 +177,18 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'."
177 :type '(choice (const :tag "Default" nil) 177 :type '(choice (const :tag "Default" nil)
178 string)) 178 string))
179 179
180(defcustom display-time-help-echo-format "%a %b %e, %Y"
181 "Format for the help echo when hovering over the time in the mode line.
182Use the function `customize-variable' to choose a common format, and/or
183see the function `format-time-string' for an explanation of the syntax."
184 :version "31.1"
185 :type `(choice
186 ,@(mapcar #'(lambda (fmt)
187 (list 'const
188 ':tag (format-time-string fmt 0 "UTC") fmt))
189 '("%a %b %e, %Y" "%F (%a)" "%a %D"))
190 (string :tag "Format string")))
191
180(defcustom display-time-string-forms 192(defcustom display-time-string-forms
181 '((if (and (not display-time-format) display-time-day-and-date) 193 '((if (and (not display-time-format) display-time-day-and-date)
182 (format-time-string "%a %b %e " now) 194 (format-time-string "%a %b %e " now)
@@ -186,7 +198,9 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'."
186 (if display-time-24hr-format "%H:%M" "%-I:%M%p")) 198 (if display-time-24hr-format "%H:%M" "%-I:%M%p"))
187 now) 199 now)
188 'face 'display-time-date-and-time 200 'face 'display-time-date-and-time
189 'help-echo (format-time-string "%a %b %e, %Y" now)) 201 'help-echo (format-time-string (if (stringp display-time-help-echo-format)
202 display-time-help-echo-format
203 "%a %b %e, %Y") now))
190 load 204 load
191 (if mail 205 (if mail
192 ;; Build the string every time to act on customization. 206 ;; Build the string every time to act on customization.