Mercurial > emacs
changeset 73176:3dbfd59b44b5
(european-calendar-style): Call european-calendar or american-calendar
as needed when set.
(diary-view-entries, list-calendar-holidays): Move autoloads before
use.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 30 Sep 2006 00:20:16 +0000 |
parents | 73c3fffc36e7 |
children | 380c726c2e33 |
files | lisp/calendar/calendar.el |
diffstat | 1 files changed, 27 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- 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.