diff options
| author | Stefan Monnier | 2002-12-05 18:42:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-12-05 18:42:33 +0000 |
| commit | f5f574114778ac1c22a2ad0d9e43bb8bac5a0d2f (patch) | |
| tree | fa97ebb1ce6624b51decffeae5e62fd78feb8ff4 | |
| parent | 7dcca9f502f7b5a682e9113fae7f599ddf53d214 (diff) | |
| download | emacs-f5f574114778ac1c22a2ad0d9e43bb8bac5a0d2f.tar.gz emacs-f5f574114778ac1c22a2ad0d9e43bb8bac5a0d2f.zip | |
(facemenu-unlisted-faces): Only update after facemenu was loaded.
(calendar-font-lock-keywords): Accept non-ASCII month names. Use regexp-opt.
| -rw-r--r-- | lisp/calendar/calendar.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index e108ef755c3..a455de947a6 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -204,7 +204,6 @@ If nil, make an icon of the frame. If non-nil, delete the frame." | |||
| 204 | :type 'boolean | 204 | :type 'boolean |
| 205 | :group 'view) | 205 | :group 'view) |
| 206 | 206 | ||
| 207 | (add-to-list 'facemenu-unlisted-faces 'diary-face) | ||
| 208 | (defvar diary-face 'diary-face | 207 | (defvar diary-face 'diary-face |
| 209 | "Face name to use for diary entries.") | 208 | "Face name to use for diary entries.") |
| 210 | (defface diary-face | 209 | (defface diary-face |
| @@ -217,13 +216,11 @@ If nil, make an icon of the frame. If non-nil, delete the frame." | |||
| 217 | "Face for highlighting diary entries." | 216 | "Face for highlighting diary entries." |
| 218 | :group 'diary) | 217 | :group 'diary) |
| 219 | 218 | ||
| 220 | (add-to-list 'facemenu-unlisted-faces 'calendar-today-face) | ||
| 221 | (defface calendar-today-face | 219 | (defface calendar-today-face |
| 222 | '((t (:underline t))) | 220 | '((t (:underline t))) |
| 223 | "Face for indicating today's date." | 221 | "Face for indicating today's date." |
| 224 | :group 'diary) | 222 | :group 'diary) |
| 225 | 223 | ||
| 226 | (add-to-list 'facemenu-unlisted-faces 'holiday-face) | ||
| 227 | (defface holiday-face | 224 | (defface holiday-face |
| 228 | '((((class color) (background light)) | 225 | '((((class color) (background light)) |
| 229 | :background "pink") | 226 | :background "pink") |
| @@ -234,6 +231,12 @@ If nil, make an icon of the frame. If non-nil, delete the frame." | |||
| 234 | "Face for indicating dates that have holidays." | 231 | "Face for indicating dates that have holidays." |
| 235 | :group 'diary) | 232 | :group 'diary) |
| 236 | 233 | ||
| 234 | (eval-after-load "facemenu" | ||
| 235 | '(progn | ||
| 236 | (add-to-list 'facemenu-unlisted-faces 'diary-face) | ||
| 237 | (add-to-list 'facemenu-unlisted-faces 'calendar-today-face) | ||
| 238 | (add-to-list 'facemenu-unlisted-faces 'holiday-face))) | ||
| 239 | |||
| 237 | (defcustom diary-entry-marker | 240 | (defcustom diary-entry-marker |
| 238 | (if (not (display-color-p)) | 241 | (if (not (display-color-p)) |
| 239 | "+" | 242 | "+" |
| @@ -2476,19 +2479,16 @@ rather than a date." | |||
| 2476 | "Array of capitalized strings giving, in order, the month names.") | 2479 | "Array of capitalized strings giving, in order, the month names.") |
| 2477 | 2480 | ||
| 2478 | (defvar calendar-font-lock-keywords | 2481 | (defvar calendar-font-lock-keywords |
| 2479 | (list | 2482 | `((,(concat (regexp-opt (mapcar 'identity calendar-month-name-array) t) |
| 2480 | '("[A-Z][a-z]+ -?[0-9]+" . font-lock-function-name-face) ; month and year | 2483 | " -?[0-9]+") |
| 2481 | (cons | 2484 | . font-lock-function-name-face) ; month and year |
| 2482 | (concat (substring (aref calendar-day-name-array 6) 0 2) | 2485 | (,(regexp-opt |
| 2483 | "\\|" | 2486 | (list (substring (aref calendar-day-name-array 6) 0 2) |
| 2484 | (substring (aref calendar-day-name-array 0) 0 2)) | 2487 | (substring (aref calendar-day-name-array 0) 0 2))) |
| 2485 | 'font-lock-comment-face) | 2488 | ;; Saturdays and Sundays are hilited differently. |
| 2486 | (cons | 2489 | . font-lock-comment-face) |
| 2487 | (mapconcat 'identity | 2490 | (,(regexp-opt (mapcar (lambda (x) (substring x 0 2)) calendar-day-name-array)) |
| 2488 | (mapcar '(lambda (x) (substring x 0 2)) | 2491 | . font-lock-reference-face)) |
| 2489 | calendar-day-name-array) | ||
| 2490 | "\\|") | ||
| 2491 | 'font-lock-reference-face)) | ||
| 2492 | "Default keywords to highlight in Calendar mode.") | 2492 | "Default keywords to highlight in Calendar mode.") |
| 2493 | 2493 | ||
| 2494 | 2494 | ||