Subject: 23.0.60; calendar marks and font-lock-mode

From: Stephen Berman <[email-masked]>
Date: Wed, 04 Feb 2009 18:03:36 +0100

In GNU Emacs 23.0.60.31 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-01-31 on escher

Let ~/.emacs consist of the following three sexps:

(add-hook 'calendar-today-visible-hook 'calendar-mark-today)
(setq calendar-mark-diary-entries-flag t)
(setq calendar-mark-holidays-flag t)

(i) Start Emacs by invoking `emacs', then type `M-x calendar'.
=> In the Calendar, today's date is marked with `=', diary entries are
marked with `+' and holidays are marked with `*'.

(ii) Start Emacs by invoking `emacs', type `q' to quit the splash
screen, then type `M-x calendar'.
=> In the Calendar, today's date is marked with the face calendar-today,
diary entries are marked with the face diary and holidays are marked
with the face holiday.

The difference between (i) and (ii) is that the splash screen is in
Fundamental mode and in this mode font-lock-mode is nil, which makes the
calendar marks use string displays rather than faces, due, I believe, to
this change:

2008-04-02  Glenn Morris  <[email-masked]>

	* calendar/calendar.el (diary-entry-marker, calendar-today-marker)
	(calendar-holiday-marker, mark-visible-calendar-date):
	* calendar/diary-lib.el (fancy-diary-display):
	Check for font-lock-mode before using faces.

This change is justified by the following comment in calendar.el: "These
[defcustoms] don't respect changes in font-lock-mode after loading."  So
maybe having to live with (i) is the lesser evil (the faces can (only)
be restored in the same Emacs session by explicitly changing the
variables' values in Custom or with setq).

Steve Berman