changeset 50699:fa4e7ecda348

(fancy-diary-display-mode): Bind "q" to `quit-window' in the fancy diary buffer.
author Sam Steingold <sds@gnu.org>
date Fri, 25 Apr 2003 01:58:49 +0000
parents 6fb83ed9ce2d
children ad311d8949c4
files lisp/ChangeLog lisp/calendar/diary-lib.el
diffstat 2 files changed, 19 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Apr 24 23:25:09 2003 +0000
+++ b/lisp/ChangeLog	Fri Apr 25 01:58:49 2003 +0000
@@ -1,3 +1,8 @@
+2003-04-24  Sam Steingold  <sds@gnu.org>
+
+	* calendar/diary-lib.el (fancy-diary-display-mode): Bind "q" to
+	`quit-window' in the fancy diary buffer.
+
 2003-04-24  Lars Hansen  <larsh@math.ku.dk>
 
 	* subr.el (assq-delete-all): Ignore non-cons elememts.
--- a/lisp/calendar/diary-lib.el	Thu Apr 24 23:25:09 2003 +0000
+++ b/lisp/calendar/diary-lib.el	Fri Apr 25 01:58:49 2003 +0000
@@ -201,16 +201,16 @@
 			   ((string= "nil" attrvalue) nil)))))
 ;    (message "(%s)[%s]=[%s]" (print type) attrvalue ret)
     ret))
-	
+
 
 (defun diary-pull-attrs (entry fileglobattrs)
-  "Pull the face-related attributes off the entry, merge with the 
-fileglobattrs, and return the (possibly modified) entry and face 
-data in a list of attrname attrvalue values.  
+  "Pull the face-related attributes off the entry, merge with the
+fileglobattrs, and return the (possibly modified) entry and face
+data in a list of attrname attrvalue values.
 The entry will be modified to drop all tags that are used for face matching.
-If entry is nil, then the fileglobattrs are being searched for, 
-the fileglobattrs variable is ignored, and 
-diary-glob-file-regexp-prefix is prepended to the regexps before each 
+If entry is nil, then the fileglobattrs are being searched for,
+the fileglobattrs variable is ignored, and
+diary-glob-file-regexp-prefix is prepended to the regexps before each
 search."
   (save-excursion
     (let (regexp regnum attrname attr-list attrname attrvalue type)
@@ -248,7 +248,7 @@
 		  type (nth 3 attr))
 	    (setq attrvalue nil)
 	    (if (string-match regexp entry)
-		(progn 
+		(progn
 		  (setq attrvalue (substring-no-properties entry
 							   (match-beginning regnum)
 							   (match-end regnum)))
@@ -258,8 +258,8 @@
 		(setq ret-attr (append ret-attr (list attrname attrvalue))))
 	    (setq attr-list (cdr attr-list)))))))
   (list entry ret-attr))
-  
-  
+
+
 
 (defun list-diary-entries (date number)
   "Create and display a buffer containing the relevant lines in diary-file.
@@ -983,7 +983,7 @@
 		      temp (diary-pull-attrs entry file-glob-attrs)
 		      marks (nth 1 temp))
 		(mark-visible-calendar-date
-		 (calendar-gregorian-from-absolute date) 
+		 (calendar-gregorian-from-absolute date)
 		 (if (< 0 (length marks))
 		     marks
 		   (if (consp mark)
@@ -1339,7 +1339,7 @@
 			     entry
 			     specifier
 			     (if entry-start (copy-marker entry-start)
-			       nil) 
+			       nil)
 			     marks)
 	  (setq entry-found (or entry-found diary-entry)))))
     entry-found))
@@ -1733,7 +1733,8 @@
   "Diary"
   "Major mode used while displaying diary entries using Fancy Display."
   (set (make-local-variable 'font-lock-defaults)
-       '(fancy-diary-font-lock-keywords t)))
+       '(fancy-diary-font-lock-keywords t))
+  (define-key (current-local-map) "q" 'quit-window))
 
 
 (defvar fancy-diary-font-lock-keywords