Commit 4e80f517 authored by Sam Steingold's avatar Sam Steingold

(fancy-diary-display-mode): Bind "q" to `quit-window'

in the fancy diary buffer.
parent 4e837cd0
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> 2003-04-24 Lars Hansen <larsh@math.ku.dk>
* subr.el (assq-delete-all): Ignore non-cons elememts. * subr.el (assq-delete-all): Ignore non-cons elememts.
......
...@@ -201,16 +201,16 @@ in a face description" ...@@ -201,16 +201,16 @@ in a face description"
((string= "nil" attrvalue) nil))))) ((string= "nil" attrvalue) nil)))))
; (message "(%s)[%s]=[%s]" (print type) attrvalue ret) ; (message "(%s)[%s]=[%s]" (print type) attrvalue ret)
ret)) ret))
(defun diary-pull-attrs (entry fileglobattrs) (defun diary-pull-attrs (entry fileglobattrs)
"Pull the face-related attributes off the entry, merge with the "Pull the face-related attributes off the entry, merge with the
fileglobattrs, and return the (possibly modified) entry and face fileglobattrs, and return the (possibly modified) entry and face
data in a list of attrname attrvalue values. data in a list of attrname attrvalue values.
The entry will be modified to drop all tags that are used for face matching. 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, If entry is nil, then the fileglobattrs are being searched for,
the fileglobattrs variable is ignored, and the fileglobattrs variable is ignored, and
diary-glob-file-regexp-prefix is prepended to the regexps before each diary-glob-file-regexp-prefix is prepended to the regexps before each
search." search."
(save-excursion (save-excursion
(let (regexp regnum attrname attr-list attrname attrvalue type) (let (regexp regnum attrname attr-list attrname attrvalue type)
...@@ -248,7 +248,7 @@ search." ...@@ -248,7 +248,7 @@ search."
type (nth 3 attr)) type (nth 3 attr))
(setq attrvalue nil) (setq attrvalue nil)
(if (string-match regexp entry) (if (string-match regexp entry)
(progn (progn
(setq attrvalue (substring-no-properties entry (setq attrvalue (substring-no-properties entry
(match-beginning regnum) (match-beginning regnum)
(match-end regnum))) (match-end regnum)))
...@@ -258,8 +258,8 @@ search." ...@@ -258,8 +258,8 @@ search."
(setq ret-attr (append ret-attr (list attrname attrvalue)))) (setq ret-attr (append ret-attr (list attrname attrvalue))))
(setq attr-list (cdr attr-list))))))) (setq attr-list (cdr attr-list)))))))
(list entry ret-attr)) (list entry ret-attr))
(defun list-diary-entries (date number) (defun list-diary-entries (date number)
"Create and display a buffer containing the relevant lines in diary-file. "Create and display a buffer containing the relevant lines in diary-file.
...@@ -983,7 +983,7 @@ is marked. See the documentation for the function `list-sexp-diary-entries'." ...@@ -983,7 +983,7 @@ is marked. See the documentation for the function `list-sexp-diary-entries'."
temp (diary-pull-attrs entry file-glob-attrs) temp (diary-pull-attrs entry file-glob-attrs)
marks (nth 1 temp)) marks (nth 1 temp))
(mark-visible-calendar-date (mark-visible-calendar-date
(calendar-gregorian-from-absolute date) (calendar-gregorian-from-absolute date)
(if (< 0 (length marks)) (if (< 0 (length marks))
marks marks
(if (consp mark) (if (consp mark)
...@@ -1339,7 +1339,7 @@ best if they are nonmarking." ...@@ -1339,7 +1339,7 @@ best if they are nonmarking."
entry entry
specifier specifier
(if entry-start (copy-marker entry-start) (if entry-start (copy-marker entry-start)
nil) nil)
marks) marks)
(setq entry-found (or entry-found diary-entry))))) (setq entry-found (or entry-found diary-entry)))))
entry-found)) entry-found))
...@@ -1733,7 +1733,8 @@ Prefix arg will make the entry nonmarking." ...@@ -1733,7 +1733,8 @@ Prefix arg will make the entry nonmarking."
"Diary" "Diary"
"Major mode used while displaying diary entries using Fancy Display." "Major mode used while displaying diary entries using Fancy Display."
(set (make-local-variable 'font-lock-defaults) (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 (defvar fancy-diary-font-lock-keywords
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment