mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Obsolete calendar-load-hook in favor of eval-after-load
* 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.
This commit is contained in:
parent
c387127fee
commit
041e90962b
3 changed files with 6 additions and 11 deletions
|
|
@ -62,11 +62,6 @@ uses @code{calendar-today-marker} to mark today's date. By default,
|
||||||
the calendar uses faces named @code{holiday}, @code{diary}, and
|
the calendar uses faces named @code{holiday}, @code{diary}, and
|
||||||
@code{calendar-today} for these purposes.
|
@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
|
@vindex calendar-initial-window-hook
|
||||||
Starting the calendar runs the normal hook
|
Starting the calendar runs the normal hook
|
||||||
@code{calendar-initial-window-hook}. Recomputation of the calendar
|
@code{calendar-initial-window-hook}. Recomputation of the calendar
|
||||||
|
|
|
||||||
|
|
@ -17584,11 +17584,10 @@ file that set values:
|
||||||
|
|
||||||
@group
|
@group
|
||||||
;; Set calendar highlighting colors
|
;; Set calendar highlighting colors
|
||||||
(add-hook 'calendar-load-hook
|
(with-eval-after-load 'calendar
|
||||||
(lambda ()
|
(set-face-foreground 'diary "skyblue")
|
||||||
(set-face-foreground 'diary-face "skyblue")
|
(set-face-background 'holiday "slate blue")
|
||||||
(set-face-background 'holiday-face "slate blue")
|
(set-face-foreground 'holiday "white"))
|
||||||
(set-face-foreground 'holiday-face "white")))
|
|
||||||
@end group
|
@end group
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,8 @@ The marking symbol is specified by the variable `calendar-holiday-marker'."
|
||||||
This is the place to add key bindings to `calendar-mode-map'."
|
This is the place to add key bindings to `calendar-mode-map'."
|
||||||
:type 'hook
|
:type 'hook
|
||||||
:group 'calendar-hooks)
|
:group 'calendar-hooks)
|
||||||
|
(make-obsolete-variable 'calendar-load-hook
|
||||||
|
"use `with-eval-after-load' instead." "26.1")
|
||||||
|
|
||||||
(defcustom calendar-initial-window-hook nil
|
(defcustom calendar-initial-window-hook nil
|
||||||
"List of functions to be called when the calendar window is created.
|
"List of functions to be called when the calendar window is created.
|
||||||
|
|
@ -1257,7 +1259,6 @@ diary entries can also be marked on the calendar (see
|
||||||
|
|
||||||
Runs the following hooks:
|
Runs the following hooks:
|
||||||
|
|
||||||
`calendar-load-hook' - after loading calendar.el
|
|
||||||
`calendar-today-visible-hook', `calendar-today-invisible-hook' - after
|
`calendar-today-visible-hook', `calendar-today-invisible-hook' - after
|
||||||
generating a calendar, if today's date is visible or not, respectively
|
generating a calendar, if today's date is visible or not, respectively
|
||||||
`calendar-initial-window-hook' - after first creating a calendar
|
`calendar-initial-window-hook' - after first creating a calendar
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue