[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog calendar/diary-lib.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog calendar/diary-lib.el |
Date: |
Fri, 04 Sep 2009 02:59:16 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/09/04 02:59:16
Modified files:
lisp : ChangeLog
lisp/calendar : diary-lib.el
Log message:
(diary-fancy-display): Only switch modes if necessary.
(diary-fancy-overriding-map): New variable.
(diary-fancy-display-mode): Set minor-mode-overriding-map-alist.
Use view-mode.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16092&r2=1.16093
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/calendar/diary-lib.el?cvsroot=emacs&r1=1.187&r2=1.188
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16092
retrieving revision 1.16093
diff -u -b -r1.16092 -r1.16093
--- ChangeLog 4 Sep 2009 02:49:07 -0000 1.16092
+++ ChangeLog 4 Sep 2009 02:59:13 -0000 1.16093
@@ -1,5 +1,11 @@
2009-09-04 Glenn Morris <address@hidden>
+ * calendar/diary-lib.el (diary-fancy-display): Only switch modes if
+ necessary.
+ (diary-fancy-overriding-map): New variable.
+ (diary-fancy-display-mode): Set minor-mode-overriding-map-alist.
+ Use view-mode.
+
* vc-rcs.el (vc-rcs-annotate-command): Use forward-line rather than
goto-line.
Index: calendar/diary-lib.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/diary-lib.el,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -b -r1.187 -r1.188
--- calendar/diary-lib.el 3 Sep 2009 06:34:19 -0000 1.187
+++ calendar/diary-lib.el 4 Sep 2009 02:59:15 -0000 1.188
@@ -1019,7 +1019,8 @@
(overlay-put
(make-overlay (match-beginning 0) (match-end 0))
'face temp-face)))))))
- (diary-fancy-display-mode)
+ (or (eq major-mode 'diary-fancy-display-mode)
+ (diary-fancy-display-mode))
(calendar-set-mode-line date-string)
(message "Preparing diary...done"))))
@@ -2348,6 +2349,11 @@
(setq end (line-beginning-position 2)))
(font-lock-default-fontify-region beg end verbose))
+(defvar diary-fancy-overriding-map (let ((map (make-sparse-keymap)))
+ (define-key map "q" 'quit-window)
+ map)
+ "Keymap overriding minor-mode maps in `diary-fancy-display-mode'.")
+
(define-derived-mode diary-fancy-display-mode fundamental-mode
"Diary"
"Major mode used while displaying diary entries using Fancy Display."
@@ -2356,7 +2362,9 @@
t nil nil nil
(font-lock-fontify-region-function
. diary-fancy-font-lock-fontify-region-function)))
- (local-set-key "q" 'quit-window))
+ (set (make-local-variable 'minor-mode-overriding-map-alist)
+ (list (cons t diary-fancy-overriding-map)))
+ (view-mode 1))
(define-obsolete-function-alias 'fancy-diary-display-mode
'diary-fancy-display-mode "23.1")
- [Emacs-diffs] emacs/lisp ChangeLog calendar/diary-lib.el,
Glenn Morris <=