# HG changeset patch # User Richard M. Stallman # Date 1039296657 0 # Node ID b243692710b42262c379f313827f1eef9b157dde # Parent 376c832d1ca7ee92b82da2df161394edc16b94fa (calendar-day-name): Move defn down. diff -r 376c832d1ca7 -r b243692710b4 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Sat Dec 07 21:30:22 2002 +0000 +++ b/lisp/calendar/calendar.el Sat Dec 07 21:30:57 2002 +0000 @@ -2458,17 +2458,6 @@ (+ (* 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 @@ . 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.