Mercurial > emacs
diff lisp/calendar/diary-lib.el @ 90224:2d92f5c9d6ae
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 514-518)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 104-105)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 26 Aug 2005 09:51:52 +0000 |
parents | f9a65d7ebd29 3c2360bf81c4 |
children | fa0da9b57058 |
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el Fri Aug 05 10:57:36 2005 +0000 +++ b/lisp/calendar/diary-lib.el Fri Aug 26 09:51:52 2005 +0000 @@ -1650,6 +1650,12 @@ (or (diary-remind sexp (car days) marking) (diary-remind sexp (cdr days) marking)))))) +(defvar diary-modify-entry-list-string-function nil + "Function applied to entry string before putting it into the entries list. +Can be used by programs integrating a diary list into other buffers (e.g. +org.el and planner.el) to modify the string or add properties to it. +The function takes a string argument and must return a string.") + (defun add-to-diary-list (date string specifier &optional marker globcolor) "Add the entry (DATE STRING SPECIFIER MARKER GLOBCOLOR) to `diary-entries-list'. Do nothing if DATE or STRING is nil." @@ -1659,6 +1665,9 @@ (buffer-file-name)))) (or (string= prefix "") (setq string (format "[%s] %s" prefix string))))) + (and diary-modify-entry-list-string-function + (setq string (funcall diary-modify-entry-list-string-function + string))) (setq diary-entries-list (append diary-entries-list (list (list date string specifier marker globcolor))))))