aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calendar
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-12-07 21:30:57 +0000
committerRichard M. Stallman <[email protected]>2002-12-07 21:30:57 +0000
commite0dfc625b57646bdc9c4cc5d51df0f6551647ef6 (patch)
tree3ffc8e0195cab61e19b059dbf7b26376643bf5d0 /lisp/calendar
parent9ac8c1d349c5a619a6e53c3b6d9467a02280a2e3 (diff)
(calendar-day-name): Move defn down.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/calendar.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index a455de947a..a9d9a70439 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -2458,17 +2458,6 @@ If optional NODAY is t, does not ask for day, but just returns
(+ (* 12 (- yr2 yr1))
(- mon2 mon1)))
-(defun calendar-day-name (date &optional width absolute)
- "Return a string with the name of the day of the week of DATE.
-If WIDTH is non-nil, return just the first WIDTH characters of the name.
-If ABSOLUTE is non-nil, then DATE is actually the day-of-the-week
-rather than a date."
- (let ((string (aref calendar-day-name-array
- (if absolute date (calendar-day-of-week date)))))
- (cond ((null width) string)
- (enable-multibyte-characters (truncate-string-to-width string width))
- (t (substring string 0 width)))))
-
(defvar calendar-day-name-array
["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"]
"Array of capitalized strings giving, in order, the day names.")
@@ -2491,6 +2480,16 @@ rather than a date."
. font-lock-reference-face))
"Default keywords to highlight in Calendar mode.")
+(defun calendar-day-name (date &optional width absolute)
+ "Return a string with the name of the day of the week of DATE.
+If WIDTH is non-nil, return just the first WIDTH characters of the name.
+If ABSOLUTE is non-nil, then DATE is actually the day-of-the-week
+rather than a date."
+ (let ((string (aref calendar-day-name-array
+ (if absolute date (calendar-day-of-week date)))))
+ (cond ((null width) string)
+ (enable-multibyte-characters (truncate-string-to-width string width))
+ (t (substring string 0 width)))))
(defun calendar-make-alist (sequence &optional start-index filter)
"Make an assoc list corresponding to SEQUENCE.