comparison lisp/calendar/calendar.el @ 63221:6e968f79cfbc

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/calendar/calendar.el (diary, calendar-today, holiday) (mark-visible-calendar-date): Remove "-face" suffix from face names. (diary-face, calendar-today-face, holiday-face): New backward-compatibility aliases for renamed faces. (eval-after-load "facemenu", diary-entry-marker) (calendar-today-marker, calendar-holiday-marker, diary-face): Use renamed calendar faces.
author Miles Bader <miles@gnu.org>
date Fri, 10 Jun 2005 10:43:42 +0000
parents c3dbcfe29c9e
children e3610cf31194
comparison
equal deleted inserted replaced
63220:b14224937156 63221:6e968f79cfbc
204 "*Determine how the calendar mode removes a frame no longer needed. 204 "*Determine how the calendar mode removes a frame no longer needed.
205 If nil, make an icon of the frame. If non-nil, delete the frame." 205 If nil, make an icon of the frame. If non-nil, delete the frame."
206 :type 'boolean 206 :type 'boolean
207 :group 'view) 207 :group 'view)
208 208
209 (defvar diary-face 'diary-face 209 (defvar diary-face 'diary
210 "Face name to use for diary entries.") 210 "Face name to use for diary entries.")
211 (defface diary-face 211 (defface diary
212 '((((min-colors 88) (class color) (background light)) 212 '((((min-colors 88) (class color) (background light))
213 :foreground "red1") 213 :foreground "red1")
214 (((class color) (background light)) 214 (((class color) (background light))
215 :foreground "red") 215 :foreground "red")
216 (((min-colors 88) (class color) (background dark)) 216 (((min-colors 88) (class color) (background dark))
219 :foreground "yellow") 219 :foreground "yellow")
220 (t 220 (t
221 :weight bold)) 221 :weight bold))
222 "Face for highlighting diary entries." 222 "Face for highlighting diary entries."
223 :group 'diary) 223 :group 'diary)
224 224 ;; backward-compatibility alias
225 (defface calendar-today-face 225 (put 'diary-face 'face-alias 'diary)
226
227 (defface calendar-today
226 '((t (:underline t))) 228 '((t (:underline t)))
227 "Face for indicating today's date." 229 "Face for indicating today's date."
228 :group 'diary) 230 :group 'diary)
229 231 ;; backward-compatibility alias
230 (defface holiday-face 232 (put 'calendar-today-face 'face-alias 'calendar-today)
233
234 (defface holiday
231 '((((class color) (background light)) 235 '((((class color) (background light))
232 :background "pink") 236 :background "pink")
233 (((class color) (background dark)) 237 (((class color) (background dark))
234 :background "chocolate4") 238 :background "chocolate4")
235 (t 239 (t
236 :inverse-video t)) 240 :inverse-video t))
237 "Face for indicating dates that have holidays." 241 "Face for indicating dates that have holidays."
238 :group 'diary) 242 :group 'diary)
243 ;; backward-compatibility alias
244 (put 'holiday-face 'face-alias 'holiday)
239 245
240 (eval-after-load "facemenu" 246 (eval-after-load "facemenu"
241 '(progn 247 '(progn
242 (add-to-list 'facemenu-unlisted-faces 'diary-face) 248 (add-to-list 'facemenu-unlisted-faces 'diary)
243 (add-to-list 'facemenu-unlisted-faces 'calendar-today-face) 249 (add-to-list 'facemenu-unlisted-faces 'calendar-today)
244 (add-to-list 'facemenu-unlisted-faces 'holiday-face))) 250 (add-to-list 'facemenu-unlisted-faces 'holiday)))
245 251
246 (defcustom diary-entry-marker 252 (defcustom diary-entry-marker
247 (if (not (display-color-p)) 253 (if (not (display-color-p))
248 "+" 254 "+"
249 'diary-face) 255 'diary)
250 "*How to mark dates that have diary entries. 256 "*How to mark dates that have diary entries.
251 The value can be either a single-character string or a face." 257 The value can be either a single-character string or a face."
252 :type '(choice string face) 258 :type '(choice string face)
253 :group 'diary) 259 :group 'diary)
254 260
255 (defcustom calendar-today-marker 261 (defcustom calendar-today-marker
256 (if (not (display-color-p)) 262 (if (not (display-color-p))
257 "=" 263 "="
258 'calendar-today-face) 264 'calendar-today)
259 "*How to mark today's date in the calendar. 265 "*How to mark today's date in the calendar.
260 The value can be either a single-character string or a face. 266 The value can be either a single-character string or a face.
261 Marking today's date is done only if you set up `today-visible-calendar-hook' 267 Marking today's date is done only if you set up `today-visible-calendar-hook'
262 to request that." 268 to request that."
263 :type '(choice string face) 269 :type '(choice string face)
264 :group 'calendar) 270 :group 'calendar)
265 271
266 (defcustom calendar-holiday-marker 272 (defcustom calendar-holiday-marker
267 (if (not (display-color-p)) 273 (if (not (display-color-p))
268 "*" 274 "*"
269 'holiday-face) 275 'holiday)
270 "*How to mark notable dates in the calendar. 276 "*How to mark notable dates in the calendar.
271 The value can be either a single-character string or a face." 277 The value can be either a single-character string or a face."
272 :type '(choice string face) 278 :type '(choice string face)
273 :group 'calendar) 279 :group 'calendar)
274 280
2941 (delete-char 1) 2947 (delete-char 1)
2942 (insert mark) 2948 (insert mark)
2943 (forward-char -2)) 2949 (forward-char -2))
2944 (let ; attr list 2950 (let ; attr list
2945 ((temp-face 2951 ((temp-face
2946 (make-symbol (apply 'concat "temp-face-" 2952 (make-symbol (apply 'concat "temp-"
2947 (mapcar '(lambda (sym) 2953 (mapcar '(lambda (sym)
2948 (cond ((symbolp sym) (symbol-name sym)) 2954 (cond ((symbolp sym) (symbol-name sym))
2949 ((numberp sym) (int-to-string sym)) 2955 ((numberp sym) (int-to-string sym))
2950 (t sym))) mark)))) 2956 (t sym))) mark))))
2951 (faceinfo mark)) 2957 (faceinfo mark))