aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-11-07 03:51:16 +0000
committerRichard M. Stallman1996-11-07 03:51:16 +0000
commit3bfbd249c8c674330a3effc4414d4d6be31d4520 (patch)
tree072b093a770980ca001f675377895fb1dd78df7f
parent81b8f0e64b3d58628f3357313a662a4b9c6750da (diff)
downloademacs-3bfbd249c8c674330a3effc4414d4d6be31d4520.tar.gz
emacs-3bfbd249c8c674330a3effc4414d4d6be31d4520.zip
(display-time-format): New variable.
(display-time-string-forms): Use display-time-format.
-rw-r--r--lisp/time.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/time.el b/lisp/time.el
index 17abe7f4965..9d418d4f8f7 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -100,17 +100,23 @@ This runs the normal hook `display-time-hook' after each update."
100 'display-time-event-handler)))) 100 'display-time-event-handler))))
101 101
102 102
103(defvar display-time-format
104 (concat
105 (if display-time-day-and-date
106 "%a %b %e" "")
107 (if display-time-24hr-format "%H:%m" "%-I:%M%p"))
108 "*A string specifying the format for displaying the time in the mode line.
109See the function `format-time-string' for an explanation of
110how to write this string.")
111
103(defvar display-time-string-forms 112(defvar display-time-string-forms
104 '((if display-time-day-and-date 113 '((format-time-string display-time-format now)
105 (format "%s %s %s " dayname monthname day)
106 "")
107 (format "%s:%s%s"
108 (if display-time-24hr-format 24-hours 12-hours)
109 minutes
110 (if display-time-24hr-format "" am-pm))
111 load 114 load
112 (if mail " Mail" "")) 115 (if mail " Mail" ""))
113 "*A list of expressions governing display of the time in the mode line. 116 "*A list of expressions governing display of the time in the mode line.
117For most purposes, you can control the time format using `display-time-format'
118which is a more standard interface.
119
114This expression is a list of expressions that can involve the keywords 120This expression is a list of expressions that can involve the keywords
115`load', `day', `month', and `year', `12-hours', `24-hours', `minutes', 121`load', `day', `month', and `year', `12-hours', `24-hours', `minutes',
116`seconds', all numbers in string form, and `monthname', `dayname', `am-pm', 122`seconds', all numbers in string form, and `monthname', `dayname', `am-pm',