# HG changeset patch # User Glenn Morris # Date 1159575616 0 # Node ID 3dbfd59b44b596b57e04b985e38bf7c0bee28e44 # Parent 73c3fffc36e796cbb109e47e39b96fd423f6bfe4 (european-calendar-style): Call european-calendar or american-calendar as needed when set. (diary-view-entries, list-calendar-holidays): Move autoloads before use. diff -r 73c3fffc36e7 -r 3dbfd59b44b5 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Fri Sep 29 21:18:15 2006 +0000 +++ b/lisp/calendar/calendar.el Sat Sep 30 00:20:16 2006 +0000 @@ -568,11 +568,21 @@ Names can be capitalized or not, written in full (as specified by the variable `calendar-day-name-array'), or abbreviated (as specified by -`calendar-day-abbrev-array') with or without a period. To take effect, -this variable should be set before the calendar package and its associates -are loaded. Otherwise, use one of the functions `european-calendar' or -`american-calendar' to force the appropriate update." +`calendar-day-abbrev-array') with or without a period. + +Setting this variable directly does not take effect (if the +calendar package is already loaded). Rather, use either +\\[customize] or the functions `european-calendar' and +`american-calendar'." :type 'boolean + ;; Without :initialize (require 'calendar) throws an error because + ;; american-calendar is undefined at this point. + :initialize 'custom-initialize-default + :set #'(lambda (symbol value) + (if value + (european-calendar) + (american-calendar))) + :require 'calendar :group 'diary) ;;;###autoload @@ -1582,6 +1592,19 @@ (calendar-only-one-frame-setup arg)) (t (calendar-basic-setup arg)))) +(autoload 'diary-view-entries "diary-lib" + "Prepare and display a buffer with diary entries. +Searches your diary file for entries that match ARG days starting with +the date indicated by the cursor position in the displayed three-month +calendar." + t) + +(autoload 'list-calendar-holidays "holidays" + "Create a buffer containing the holidays for the current calendar window. +The holidays are those in the list `calendar-notable-days'. Returns t if any +holidays are found, nil if not." + t) + (defun calendar-basic-setup (&optional arg) "Display a three-month calendar in another window. The three months appear side by side, with the current month in the middle @@ -1649,13 +1672,6 @@ (list-calendar-holidays))) (run-hooks 'initial-calendar-window-hook)) -(autoload 'diary-view-entries "diary-lib" - "Prepare and display a buffer with diary entries. -Searches your diary file for entries that match ARG days starting with -the date indicated by the cursor position in the displayed three-month -calendar." - t) - (autoload 'view-other-diary-entries "diary-lib" "Prepare and display buffer of diary entries from an alternative diary file. Searches for entries that match ARG days, starting with the date indicated @@ -1930,12 +1946,6 @@ to the date indicated by point." t) -(autoload 'list-calendar-holidays "holidays" - "Create a buffer containing the holidays for the current calendar window. -The holidays are those in the list `calendar-notable-days'. Returns t if any -holidays are found, nil if not." - t) - (autoload 'cal-tex-cursor-month "cal-tex" "Make a buffer with LaTeX commands for the month cursor is on. Optional prefix argument specifies number of months to be produced.