]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't supersede attributes for faces `diary-face', `calendar-display-face', or
authorEdward M. Reingold <reingold@emr.cs.iit.edu>
Tue, 8 Nov 1994 16:23:32 +0000 (16:23 +0000)
committerEdward M. Reingold <reingold@emr.cs.iit.edu>
Tue, 8 Nov 1994 16:23:32 +0000 (16:23 +0000)
`holiday-face' if they are already defined.

lisp/calendar/calendar.el

index 2bb57106bd627130e15aa0fb6e73e2c957b1b16b..a457d12e3c6c868ca39ee72db95872b5cd595c78 100644 (file)
@@ -151,9 +151,9 @@ The marking symbol is specified by the variable `diary-entry-marker'.")
       "+"
     (require 'faces)
     (make-face 'diary-face)
-    (if (x-display-color-p)
-        (set-face-foreground 'diary-face "red")
-      (copy-face 'bold 'diary-face))
+    (cond ((face-differs-from-default-p 'diary-face))
+          ((x-display-color-p) (set-face-foreground 'diary-face "red"))
+          (t (copy-face 'bold 'diary-face)))
     'diary-face)
   "*Used to mark dates that have diary entries.
 Can be either a single-character string or a face.")
@@ -163,7 +163,8 @@ Can be either a single-character string or a face.")
       "="
     (require 'faces)
     (make-face 'calendar-today-face)
-    (set-face-underline-p 'calendar-today-face t)
+    (if (not (face-differs-from-default-p 'calendar-today-face))
+        (set-face-underline-p 'calendar-today-face t))
     'calendar-today-face)
   "*Used to mark today's date.
 Can be either a single-character string or a face.")
@@ -173,9 +174,10 @@ Can be either a single-character string or a face.")
       "*"
     (require 'faces)
     (make-face 'holiday-face)
-    (if (x-display-color-p)
-       (set-face-background 'holiday-face "pink")
-      (copy-face 'highlight 'holiday-face))
+    (cond ((face-differs-from-default-p 'holiday-face))
+          ((x-display-color-p) (set-face-background 'holiday-face "pink"))
+          (t (set-face-background 'holiday-face "black")
+             (set-face-foreground 'holiday-face "white")))
     'holiday-face)
   "*Used to mark notable dates in the calendar.
 Can be either a single-character string or a face.")