summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-31 15:38:10 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-31 15:38:10 +0000
commit80024d7ad7f4ebb3a7fc55e055e2d308b36ab0ae (patch)
tree8e57cae1a0342564e22b7aaf89b194404c6900d0
parent0d46505c2741ffe44418bccd7a1ff4253fccc8df (diff)
downloademacs-80024d7ad7f4ebb3a7fc55e055e2d308b36ab0ae.tar.gz
(diary-face, calendar-today-face, holiday-face):
Use defface to define them.
-rw-r--r--lisp/calendar/calendar.el53
1 files changed, 29 insertions, 24 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 5ea0d145ea9..d1642cdc547 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -188,48 +188,53 @@ The marking symbol is specified by the variable `diary-entry-marker'."
:type 'boolean
:group 'diary)
+(when window-system
+ (add-to-list 'facemenu-unlisted-faces 'diary-face)
+ (defface diary-face
+ '(((:class color) :foreground "red")
+ (t (:bold t)))
+ "Face for highlighting diary entries."
+ :group 'diary)
+
+ (add-to-list 'facemenu-unlisted-faces 'calendar-today-face)
+ (defface calendar-today-face
+ '((t (:underline t)))
+ "Face for indicating today's date."
+ :group 'diary)
+
+ (add-to-list 'facemenu-unlisted-faces 'holiday-face)
+ (defface holiday-face
+ '(((:class color) :background "pink")
+ (t (:inverse-video t)))
+ "Face for indicating dates that have holidays."
+ :group 'diary))
+
(defcustom diary-entry-marker
(if (not window-system)
"+"
- (require 'faces)
- (add-to-list 'facemenu-unlisted-faces 'diary-face)
- (make-face '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."
+ "*How to mark dates that have diary entries.
+The value can be either a single-character string or a face."
:type '(choice string face)
:group 'diary)
(defcustom calendar-today-marker
(if (not window-system)
"="
- (require 'faces)
- (add-to-list 'facemenu-unlisted-faces 'calendar-today-face)
- (make-face 'calendar-today-face)
- (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."
+ "*How to mark today's date in the calendar.
+The value can be either a single-character string or a face.
+Marking today's date is done only if you set up `today-visible-calendar-hook'
+to request that."
:type '(choice string face)
:group 'calendar)
(defcustom calendar-holiday-marker
(if (not window-system)
"*"
- (require 'faces)
- (add-to-list 'facemenu-unlisted-faces 'holiday-face)
- (make-face '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."
+ "*How to mark notable dates in the calendar.
+The value can be either a single-character string or a face."
:type '(choice string face)
:group 'calendar)