changeset 101899:6c501f7469ab

(diary-entry-marker, calendar-today-marker, calendar-holiday-marker) (calendar-mark-visible-date): It doesn't make sense to check font-lock-mode (see comments; reverts 2008-04-02 change). (Bug#2199)
author Glenn Morris <rgm@gnu.org>
date Sun, 08 Feb 2009 01:52:01 +0000
parents 514123462b33
children f0a6af6c77e8
files lisp/calendar/calendar.el
diffstat 1 files changed, 22 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/calendar.el	Sun Feb 08 00:47:15 2009 +0000
+++ b/lisp/calendar/calendar.el	Sun Feb 08 01:52:01 2009 +0000
@@ -196,6 +196,7 @@
 (define-obsolete-variable-alias 'mark-diary-entries-in-calendar
   'calendar-mark-diary-entries-flag "23.1")
 
+;; FIXME :set
 (defcustom calendar-mark-diary-entries-flag nil
   "Non-nil means mark dates with diary entries, in the calendar window.
 The marking symbol is specified by the variable `diary-entry-marker'."
@@ -250,7 +251,15 @@
 (put 'holiday-face 'face-alias 'holiday)
 
 ;; These don't respect changes in font-lock-mode after loading.
-(defcustom diary-entry-marker (if (and font-lock-mode (display-color-p))
+
+;; Checking font-lock-mode is broken, since it is a buffer-local
+;; variable, and which buffer happens to be current when this file is
+;; loaded shouldn't make a difference.  One could perhaps check
+;; global-font-lock-mode, or font-lock-global-modes; but this feature
+;; doesn't use font-lock, so there's no real reason it should respect
+;; those either.  See bug#2199.
+(defcustom diary-entry-marker (if ;(and font-lock-mode
+                                  (display-color-p)
                                   'diary
                                 "+")
   "How to mark dates that have diary entries.
@@ -258,7 +267,8 @@
   :type '(choice string face)
   :group 'diary)
 
-(defcustom calendar-today-marker (if (and font-lock-mode (display-color-p))
+(defcustom calendar-today-marker (if ;(and font-lock-mode
+                                     (display-color-p)
                                      'calendar-today
                                    "=")
   "How to mark today's date in the calendar.
@@ -267,7 +277,8 @@
   :type '(choice string face)
   :group 'calendar)
 
-(defcustom calendar-holiday-marker (if (and font-lock-mode (display-color-p))
+(defcustom calendar-holiday-marker (if ;(and font-lock-mode
+                                       (display-color-p)
                                        'holiday
                                      "*")
   "How to mark notable dates in the calendar.
@@ -288,6 +299,7 @@
 (define-obsolete-variable-alias 'mark-holidays-in-calendar
   'calendar-mark-holidays-flag "23.1")
 
+;; FIXME :set
 (defcustom calendar-mark-holidays-flag nil
   "Non-nil means mark dates of holidays in the calendar window.
 The marking symbol is specified by the variable `calendar-holiday-marker'."
@@ -2267,11 +2279,14 @@
           (calendar-cursor-to-visible-date date)
           (setq mark
                 (or (and (stringp mark) (= (length mark) 1) mark) ; single-char
-                    (and font-lock-mode
-                         (or
+                    ;; The next two use to also check font-lock-mode.
+                    ;; See comments above diary-entry-marker for why
+                    ;; this was dropped.
+;;;                    (and font-lock-mode
+;;;                         (or
                           (and (listp mark) (> (length mark) 0) mark) ; attrs
-                          (and (facep mark) mark))) ; face-name
-                    diary-entry-marker))
+                          (and (facep mark) mark) ; )) face-name
+                          diary-entry-marker))
           (cond
            ;; Face or an attr-list that contained a face.
            ((facep mark)