aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-09-05 21:11:34 +0000
committerGlenn Morris2009-09-05 21:11:34 +0000
commitc8dc27bff3626bf0826b310f69f7d7f9c54eba74 (patch)
tree2bb1ebc03e4992f0c3f60ffeb3c83c5fd554eb14
parentcca065d8cf176c7900de58b636bea9ea7a622a7a (diff)
downloademacs-c8dc27bff3626bf0826b310f69f7d7f9c54eba74.tar.gz
emacs-c8dc27bff3626bf0826b310f69f7d7f9c54eba74.zip
(diary-entry): Add help-echo and follow-link properties to this button.
(diary-fancy-display): Don't extend the button to the final newline. (diary-fancy-display-mode): Continue to define "q" as a local key.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/diary-lib.el12
2 files changed, 12 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a7e43340749..4163e23aab8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12009-09-05 Glenn Morris <rgm@gnu.org> 12009-09-05 Glenn Morris <rgm@gnu.org>
2 2
3 * calendar/diary-lib.el (diary-entry): Add help-echo and follow-link
4 properties to this button.
5 (diary-fancy-display): Don't extend the button to the final newline.
6 (diary-fancy-display-mode): Continue to define "q" as a local key.
7
3 * calendar/cal-china.el (holiday-chinese): Make it slightly more 8 * calendar/cal-china.el (holiday-chinese): Make it slightly more
4 efficient. 9 efficient.
5 10
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 1975be6c2ea..3beb3548a35 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -908,9 +908,9 @@ in the mode line. This is an option for `diary-display-function'."
908(define-obsolete-function-alias 'simple-diary-display 908(define-obsolete-function-alias 'simple-diary-display
909 'diary-simple-display "23.1") 909 'diary-simple-display "23.1")
910 910
911(define-button-type 'diary-entry 911(define-button-type 'diary-entry 'action #'diary-goto-entry
912 'action #'diary-goto-entry 912 'face 'diary-button 'help-echo "Find this diary entry"
913 'face 'diary-button) 913 'follow-link t)
914 914
915(defun diary-goto-entry (button) 915(defun diary-goto-entry (button)
916 "Jump to the diary entry for the BUTTON at point." 916 "Jump to the diary entry for the BUTTON at point."
@@ -1000,7 +1000,7 @@ This is an option for `diary-display-function'."
1000 this-loc marks temp-face) 1000 this-loc marks temp-face)
1001 (unless (zerop (length this-entry)) 1001 (unless (zerop (length this-entry))
1002 (if (setq this-loc (nth 3 entry)) 1002 (if (setq this-loc (nth 3 entry))
1003 (insert-button (concat this-entry "\n") 1003 (insert-button this-entry
1004 ;; (MARKER FILENAME SPECIFIER LITERAL) 1004 ;; (MARKER FILENAME SPECIFIER LITERAL)
1005 'locator (list (car this-loc) 1005 'locator (list (car this-loc)
1006 (cadr this-loc) 1006 (cadr this-loc)
@@ -1008,7 +1008,8 @@ This is an option for `diary-display-function'."
1008 (or (nth 2 this-loc) 1008 (or (nth 2 this-loc)
1009 (nth 1 entry))) 1009 (nth 1 entry)))
1010 :type 'diary-entry) 1010 :type 'diary-entry)
1011 (insert this-entry ?\n)) 1011 (insert this-entry))
1012 (insert ?\n)
1012 ;; Doesn't make sense to check font-lock-mode - see 1013 ;; Doesn't make sense to check font-lock-mode - see
1013 ;; comments above diary-entry-marker in calendar.el. 1014 ;; comments above diary-entry-marker in calendar.el.
1014 (and ; font-lock-mode 1015 (and ; font-lock-mode
@@ -2362,6 +2363,7 @@ Fontify the region between BEG and END, quietly unless VERBOSE is non-nil."
2362 t nil nil nil 2363 t nil nil nil
2363 (font-lock-fontify-region-function 2364 (font-lock-fontify-region-function
2364 . diary-fancy-font-lock-fontify-region-function))) 2365 . diary-fancy-font-lock-fontify-region-function)))
2366 (local-set-key "q" 'quit-window)
2365 (set (make-local-variable 'minor-mode-overriding-map-alist) 2367 (set (make-local-variable 'minor-mode-overriding-map-alist)
2366 (list (cons t diary-fancy-overriding-map))) 2368 (list (cons t diary-fancy-overriding-map)))
2367 (view-mode 1)) 2369 (view-mode 1))