* lisp/calendar/calendar.el (calendar-load-hook): Make obsolete.
(calendar): Doc fix - no longer mention calendar-load-hook.
* doc/emacs/cal-xtra.texi (Calendar Customizing):
No longer mention calendar-load-hook.
* doc/lispintro/emacs-lisp-intro.texi (X11 Colors):
Replace calendar-load-hook in example with with-eval-after-load.
the calendar uses faces named @code{holiday}, @code{diary}, and
@code{calendar-today} for these purposes.
-@vindex calendar-load-hook
- The variable @code{calendar-load-hook} is a normal hook run when the
-calendar package is first loaded (before actually starting to display
-the calendar).
-
@vindex calendar-initial-window-hook
Starting the calendar runs the normal hook
@code{calendar-initial-window-hook}. Recomputation of the calendar
@group
;; Set calendar highlighting colors
-(add-hook 'calendar-load-hook
- (lambda ()
- (set-face-foreground 'diary-face "skyblue")
- (set-face-background 'holiday-face "slate blue")
- (set-face-foreground 'holiday-face "white")))
+(with-eval-after-load 'calendar
+ (set-face-foreground 'diary "skyblue")
+ (set-face-background 'holiday "slate blue")
+ (set-face-foreground 'holiday "white"))
@end group
@end smallexample
This is the place to add key bindings to `calendar-mode-map'."
:type 'hook
:group 'calendar-hooks)
+(make-obsolete-variable 'calendar-load-hook
+ "use `with-eval-after-load' instead." "26.1")
(defcustom calendar-initial-window-hook nil
"List of functions to be called when the calendar window is created.
Runs the following hooks:
-`calendar-load-hook' - after loading calendar.el
`calendar-today-visible-hook', `calendar-today-invisible-hook' - after
generating a calendar, if today's date is visible or not, respectively
`calendar-initial-window-hook' - after first creating a calendar