aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward M. Reingold1994-11-08 16:23:32 +0000
committerEdward M. Reingold1994-11-08 16:23:32 +0000
commit06f7e2c57ae75ba30b724114aa183bf289a4893b (patch)
tree8d7571324ca740e747bb089f0d133a09f9940d7e
parentb10fca682f8e13799a51e7d116297dc70ae0c236 (diff)
downloademacs-06f7e2c57ae75ba30b724114aa183bf289a4893b.tar.gz
emacs-06f7e2c57ae75ba30b724114aa183bf289a4893b.zip
Don't supersede attributes for faces `diary-face', `calendar-display-face', or
`holiday-face' if they are already defined.
-rw-r--r--lisp/calendar/calendar.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 2bb57106bd6..a457d12e3c6 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -151,9 +151,9 @@ The marking symbol is specified by the variable `diary-entry-marker'.")
151 "+" 151 "+"
152 (require 'faces) 152 (require 'faces)
153 (make-face 'diary-face) 153 (make-face 'diary-face)
154 (if (x-display-color-p) 154 (cond ((face-differs-from-default-p 'diary-face))
155 (set-face-foreground 'diary-face "red") 155 ((x-display-color-p) (set-face-foreground 'diary-face "red"))
156 (copy-face 'bold 'diary-face)) 156 (t (copy-face 'bold 'diary-face)))
157 'diary-face) 157 'diary-face)
158 "*Used to mark dates that have diary entries. 158 "*Used to mark dates that have diary entries.
159Can be either a single-character string or a face.") 159Can be either a single-character string or a face.")
@@ -163,7 +163,8 @@ Can be either a single-character string or a face.")
163 "=" 163 "="
164 (require 'faces) 164 (require 'faces)
165 (make-face 'calendar-today-face) 165 (make-face 'calendar-today-face)
166 (set-face-underline-p 'calendar-today-face t) 166 (if (not (face-differs-from-default-p 'calendar-today-face))
167 (set-face-underline-p 'calendar-today-face t))
167 'calendar-today-face) 168 'calendar-today-face)
168 "*Used to mark today's date. 169 "*Used to mark today's date.
169Can be either a single-character string or a face.") 170Can be either a single-character string or a face.")
@@ -173,9 +174,10 @@ Can be either a single-character string or a face.")
173 "*" 174 "*"
174 (require 'faces) 175 (require 'faces)
175 (make-face 'holiday-face) 176 (make-face 'holiday-face)
176 (if (x-display-color-p) 177 (cond ((face-differs-from-default-p 'holiday-face))
177 (set-face-background 'holiday-face "pink") 178 ((x-display-color-p) (set-face-background 'holiday-face "pink"))
178 (copy-face 'highlight 'holiday-face)) 179 (t (set-face-background 'holiday-face "black")
180 (set-face-foreground 'holiday-face "white")))
179 'holiday-face) 181 'holiday-face)
180 "*Used to mark notable dates in the calendar. 182 "*Used to mark notable dates in the calendar.
181Can be either a single-character string or a face.") 183Can be either a single-character string or a face.")