[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

39.15.1 Customizing the Calendar

The variable calendar-holiday-marker specifies how to mark a date as being a holiday. Its value may be a single-character string to insert next to the date, or a face name to use for displaying the date. Likewise, the variable diary-entry-marker specifies how to mark a date that has diary entries. The calendar creates faces named holiday-face and diary-face for these purposes; those symbols are the default values of these variables.

The variable calendar-load-hook is a normal hook run when the calendar package is first loaded (before actually starting to display the calendar).

Starting the calendar runs the normal hook initial-calendar-window-hook. Recomputation of the calendar display does not run this hook. But if you leave the calendar with the q command and reenter it, the hook runs again.

The variable today-visible-calendar-hook is a normal hook run after the calendar buffer has been prepared with the calendar when the current date is visible in the window. One use of this hook is to replace today's date with asterisks; to do that, use the hook function calendar-star-date.

 
(add-hook 'today-visible-calendar-hook 'calendar-star-date)

Another standard hook function marks the current date, either by changing its face or by adding an asterisk. Here's how to use it:

 
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)

The variable calendar-today-marker specifies how to mark today's date. Its value should be a single-character string to insert next to the date or a face name to use for displaying the date. A face named calendar-today-face is provided for this purpose; that symbol is the default for this variable.

A similar normal hook, today-invisible-calendar-hook is run if the current date is not visible in the window.

Each of the calendar cursor motion commands runs the hook calendar-move-hook after it moves the cursor.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 23 Février 2009 en utilisant texi2html 1.78.