From: Glenn Morris Date: Thu, 10 Apr 2008 03:45:26 +0000 (+0000) Subject: (diary-hook, diary-display-hook): Move here from calendar.el. X-Git-Tag: emacs-pretest-23.0.90~6366 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66d20000c523e2b5dd137fee481d007a4fcba267;p=emacs.git (diary-hook, diary-display-hook): Move here from calendar.el. (diary-hook): Doc fix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3e9320cfcee..5fb0f0c0f95 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,28 @@ +2008-04-10 Glenn Morris + + * Makefile.in (MH_E_DIR): New variable. + (MH_E_SRC): Restore variable removed 2008-03-13. + (mh-loaddefs.el): Depend on $MH_E_SRC. + (CAL_DIR, CAL_SRC): New variables. + (cal-loaddefs.el, diary-loaddefs.el, hol-loaddefs.el): + Depend on CAL_SRC. + + * calendar/calendar.el (calendar, diary): Add :prefix. + (holidays): Change :prefix. + (calendar-today, holiday, calendar-holiday-marker) + (european-calendar-style): Change custom groups. + + * calendar/calendar.el (diary-hook, diary-display-hook): + Move to diary-lib.el. + * calendar/diary-lib.el (diary-hook, diary-display-hook): + Move here from calendar.el. + * calendar/appt.el: Require diary-lib rather than calendar. + * calendar/cal-x.el (diary-display-hook): Declare for compiler. + + * calendar/appt.el (appt): Add :prefix. + + * calendar/diary-lib.el (diary-hook): Doc fix. + 2008-04-10 Stefan Monnier * minibuffer.el (minibuffer--double-dollars, read-file-name-internal): diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 7aea5d9f868..61b46a2cc97 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -139,6 +139,41 @@ See the documentation for the function `diary-list-sexp-entries'." (define-obsolete-variable-alias 'sexp-diary-entry-symbol 'diary-sexp-entry-symbol "23.1") +(defcustom diary-hook nil + "List of functions called after the display of the diary. +Used for example by the appointment package - see `appt-activate'." + :type 'hook + :group 'diary) + +(defcustom diary-display-hook nil + "List of functions that handle the display of the diary. +If nil (the default), `diary-simple-display' is used. Use +`ignore' for no diary display. + +Ordinarily, this just displays the diary buffer (with holidays +indicated in the mode line), if there are any relevant entries. +At the time these functions are called, the variable +`diary-entries-list' is a list, in order by date, of all relevant +diary entries in the form of ((MONTH DAY YEAR) STRING), where +string is the diary entry for the given date. This can be used, +for example, a different buffer for display (perhaps combined +with holidays), or produce hard copy output. + +A function `diary-fancy-display' is provided for use with this +hook; this function prepares a special noneditable diary buffer +with the relevant diary entries that has neat day-by-day +arrangement with headings. The fancy diary buffer will show the +holidays unless the variable `diary-show-holidays-flag' is set to +nil. Ordinarily, the fancy diary buffer will not show days for +which there are no diary entries, even if that day is a holiday; +if you want such days to be shown in the fancy diary buffer, set +the variable `diary-list-include-blanks' non-nil." + :type 'hook + :options '(diary-fancy-display) + :initialize 'custom-initialize-default + :set 'diary-set-maybe-redraw + :group 'diary) + (defcustom diary-list-entries-hook nil "List of functions called after diary file is culled for relevant entries. You might wish to add `diary-include-other-diary-files', in which case