summaryrefslogtreecommitdiff
path: root/lisp/calendar/calendar.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-04-07 21:53:39 +0000
committerGlenn Morris <rgm@gnu.org>2007-04-07 21:53:39 +0000
commit109eecc05898a604124d1f5ce60ad43c01c2a52e (patch)
treea0370fa6ea4222417148e7ba9dff12af88a0bc75 /lisp/calendar/calendar.el
parent2ca695f23af1698dace6a90294e9cc69f1d81fa8 (diff)
downloademacs-109eecc05898a604124d1f5ce60ad43c01c2a52e.tar.gz
(diary-font-lock-keywords, diary-live-p): Autoload these functions.
(diary-date-forms): Add a custom :set form.
Diffstat (limited to 'lisp/calendar/calendar.el')
-rw-r--r--lisp/calendar/calendar.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 18037e9b794..78f0ad115ec 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -629,6 +629,10 @@ See the documentation of `diary-date-forms' for an explanation."
(choice symbol regexp)))))
:group 'diary)
+(autoload 'diary-font-lock-keywords "diary-lib")
+(autoload 'diary-live-p "diary-lib")
+(defvar diary-font-lock-keywords)
+
(defcustom diary-date-forms
(if european-calendar-style
european-date-diary-pattern
@@ -666,6 +670,15 @@ a portion of the first word of the diary entry."
(repeat (list :inline t :format "%v"
(symbol :tag "Keyword")
(choice symbol regexp)))))
+ :initialize 'custom-initialize-default
+ :set (lambda (symbol value)
+ (unless (equal value (eval symbol))
+ (custom-set-default symbol value)
+ (setq diary-font-lock-keywords (diary-font-lock-keywords))
+ ;; Need to redraw not just to get new font-locking, but also
+ ;; to pick up any newly recognized entries.
+ (and (diary-live-p)
+ (diary))))
:group 'diary)
;;;###autoload