diff options
| author | Sam Steingold | 2003-04-25 01:58:49 +0000 |
|---|---|---|
| committer | Sam Steingold | 2003-04-25 01:58:49 +0000 |
| commit | 4e80f517a9d9f07f7bed91bf58d3d7de464a224a (patch) | |
| tree | 7cec03dc8b0489120a59dd95837ade1baa93228e | |
| parent | 4e837cd04fa391e3a06b2f0705fbc1622fc889c8 (diff) | |
| download | emacs-4e80f517a9d9f07f7bed91bf58d3d7de464a224a.tar.gz emacs-4e80f517a9d9f07f7bed91bf58d3d7de464a224a.zip | |
(fancy-diary-display-mode): Bind "q" to `quit-window'
in the fancy diary buffer.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 27 |
2 files changed, 19 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5611fbeec4e..89603e6664f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2003-04-24 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * calendar/diary-lib.el (fancy-diary-display-mode): Bind "q" to | ||
| 4 | `quit-window' in the fancy diary buffer. | ||
| 5 | |||
| 1 | 2003-04-24 Lars Hansen <larsh@math.ku.dk> | 6 | 2003-04-24 Lars Hansen <larsh@math.ku.dk> |
| 2 | 7 | ||
| 3 | * subr.el (assq-delete-all): Ignore non-cons elememts. | 8 | * subr.el (assq-delete-all): Ignore non-cons elememts. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index b403e600152..91051d63b75 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -201,16 +201,16 @@ in a face description" | |||
| 201 | ((string= "nil" attrvalue) nil))))) | 201 | ((string= "nil" attrvalue) nil))))) |
| 202 | ; (message "(%s)[%s]=[%s]" (print type) attrvalue ret) | 202 | ; (message "(%s)[%s]=[%s]" (print type) attrvalue ret) |
| 203 | ret)) | 203 | ret)) |
| 204 | 204 | ||
| 205 | 205 | ||
| 206 | (defun diary-pull-attrs (entry fileglobattrs) | 206 | (defun diary-pull-attrs (entry fileglobattrs) |
| 207 | "Pull the face-related attributes off the entry, merge with the | 207 | "Pull the face-related attributes off the entry, merge with the |
| 208 | fileglobattrs, and return the (possibly modified) entry and face | 208 | fileglobattrs, and return the (possibly modified) entry and face |
| 209 | data in a list of attrname attrvalue values. | 209 | data in a list of attrname attrvalue values. |
| 210 | The entry will be modified to drop all tags that are used for face matching. | 210 | The entry will be modified to drop all tags that are used for face matching. |
| 211 | If entry is nil, then the fileglobattrs are being searched for, | 211 | If entry is nil, then the fileglobattrs are being searched for, |
| 212 | the fileglobattrs variable is ignored, and | 212 | the fileglobattrs variable is ignored, and |
| 213 | diary-glob-file-regexp-prefix is prepended to the regexps before each | 213 | diary-glob-file-regexp-prefix is prepended to the regexps before each |
| 214 | search." | 214 | search." |
| 215 | (save-excursion | 215 | (save-excursion |
| 216 | (let (regexp regnum attrname attr-list attrname attrvalue type) | 216 | (let (regexp regnum attrname attr-list attrname attrvalue type) |
| @@ -248,7 +248,7 @@ search." | |||
| 248 | type (nth 3 attr)) | 248 | type (nth 3 attr)) |
| 249 | (setq attrvalue nil) | 249 | (setq attrvalue nil) |
| 250 | (if (string-match regexp entry) | 250 | (if (string-match regexp entry) |
| 251 | (progn | 251 | (progn |
| 252 | (setq attrvalue (substring-no-properties entry | 252 | (setq attrvalue (substring-no-properties entry |
| 253 | (match-beginning regnum) | 253 | (match-beginning regnum) |
| 254 | (match-end regnum))) | 254 | (match-end regnum))) |
| @@ -258,8 +258,8 @@ search." | |||
| 258 | (setq ret-attr (append ret-attr (list attrname attrvalue)))) | 258 | (setq ret-attr (append ret-attr (list attrname attrvalue)))) |
| 259 | (setq attr-list (cdr attr-list))))))) | 259 | (setq attr-list (cdr attr-list))))))) |
| 260 | (list entry ret-attr)) | 260 | (list entry ret-attr)) |
| 261 | 261 | ||
| 262 | 262 | ||
| 263 | 263 | ||
| 264 | (defun list-diary-entries (date number) | 264 | (defun list-diary-entries (date number) |
| 265 | "Create and display a buffer containing the relevant lines in diary-file. | 265 | "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 | temp (diary-pull-attrs entry file-glob-attrs) | 983 | temp (diary-pull-attrs entry file-glob-attrs) |
| 984 | marks (nth 1 temp)) | 984 | marks (nth 1 temp)) |
| 985 | (mark-visible-calendar-date | 985 | (mark-visible-calendar-date |
| 986 | (calendar-gregorian-from-absolute date) | 986 | (calendar-gregorian-from-absolute date) |
| 987 | (if (< 0 (length marks)) | 987 | (if (< 0 (length marks)) |
| 988 | marks | 988 | marks |
| 989 | (if (consp mark) | 989 | (if (consp mark) |
| @@ -1339,7 +1339,7 @@ best if they are nonmarking." | |||
| 1339 | entry | 1339 | entry |
| 1340 | specifier | 1340 | specifier |
| 1341 | (if entry-start (copy-marker entry-start) | 1341 | (if entry-start (copy-marker entry-start) |
| 1342 | nil) | 1342 | nil) |
| 1343 | marks) | 1343 | marks) |
| 1344 | (setq entry-found (or entry-found diary-entry))))) | 1344 | (setq entry-found (or entry-found diary-entry))))) |
| 1345 | entry-found)) | 1345 | entry-found)) |
| @@ -1733,7 +1733,8 @@ Prefix arg will make the entry nonmarking." | |||
| 1733 | "Diary" | 1733 | "Diary" |
| 1734 | "Major mode used while displaying diary entries using Fancy Display." | 1734 | "Major mode used while displaying diary entries using Fancy Display." |
| 1735 | (set (make-local-variable 'font-lock-defaults) | 1735 | (set (make-local-variable 'font-lock-defaults) |
| 1736 | '(fancy-diary-font-lock-keywords t))) | 1736 | '(fancy-diary-font-lock-keywords t)) |
| 1737 | (define-key (current-local-map) "q" 'quit-window)) | ||
| 1737 | 1738 | ||
| 1738 | 1739 | ||
| 1739 | (defvar fancy-diary-font-lock-keywords | 1740 | (defvar fancy-diary-font-lock-keywords |