diff options
| author | Glenn Morris | 2008-04-16 03:24:06 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-16 03:24:06 +0000 |
| commit | a588d349153a86e892901e9c63352d35a064bb3d (patch) | |
| tree | 432a6d47d1524070326b95ff933a187f1471fa36 | |
| parent | f5b0081187b38a4ddf71ae631453ddbe6e2e167e (diff) | |
| download | emacs-a588d349153a86e892901e9c63352d35a064bb3d.tar.gz emacs-a588d349153a86e892901e9c63352d35a064bb3d.zip | |
(diary-remind): Don't clobber `date' passed by diary-sexp-entry.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 17 |
2 files changed, 14 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5e033daf41..32734c15c24 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-04-16 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * calendar/diary-lib.el (diary-remind): Don't clobber `date' passed | ||
| 4 | by diary-sexp-entry. | ||
| 5 | |||
| 1 | 2008-04-16 Markus Triska <markus.triska@gmx.at> | 6 | 2008-04-16 Markus Triska <markus.triska@gmx.at> |
| 2 | 7 | ||
| 3 | * proced.el (proced-command-alist): Add support for darwin. | 8 | * proced.el (proced-command-alist): Add support for darwin. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index e3711331c5d..54c99e30346 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1929,8 +1929,8 @@ entry specifies that the diary entry (not the reminder) is non-marking. | |||
| 1929 | Marking of reminders is independent of whether the entry itself is a marking | 1929 | Marking of reminders is independent of whether the entry itself is a marking |
| 1930 | or nonmarking; if optional parameter MARKING is non-nil then the reminders are | 1930 | or nonmarking; if optional parameter MARKING is non-nil then the reminders are |
| 1931 | marked on the calendar." | 1931 | marked on the calendar." |
| 1932 | (let ((diary-entry (eval sexp)) | 1932 | ;; `date' has a value at this point, from diary-sexp-entry. |
| 1933 | date) | 1933 | (let ((diary-entry (eval sexp))) |
| 1934 | (cond | 1934 | (cond |
| 1935 | ;; Diary entry applies on date. | 1935 | ;; Diary entry applies on date. |
| 1936 | ((and diary-entry | 1936 | ((and diary-entry |
| @@ -1940,12 +1940,13 @@ marked on the calendar." | |||
| 1940 | ((and (integerp days) | 1940 | ((and (integerp days) |
| 1941 | (not diary-entry) ; diary entry does not apply to date | 1941 | (not diary-entry) ; diary entry does not apply to date |
| 1942 | (or (not diary-marking-entries-flag) marking)) | 1942 | (or (not diary-marking-entries-flag) marking)) |
| 1943 | (setq date (calendar-gregorian-from-absolute | 1943 | ;; Adjust date, and re-evaluate. |
| 1944 | (+ (calendar-absolute-from-gregorian date) days))) | 1944 | (let ((date (calendar-gregorian-from-absolute |
| 1945 | (when (setq diary-entry (eval sexp)) ; re-evaluate with adjusted date | 1945 | (+ (calendar-absolute-from-gregorian date) days)))) |
| 1946 | ;; Discard any mark portion from diary-anniversary, etc. | 1946 | (when (setq diary-entry (eval sexp)) |
| 1947 | (if (consp diary-entry) (setq diary-entry (cdr diary-entry))) | 1947 | ;; Discard any mark portion from diary-anniversary, etc. |
| 1948 | (mapconcat 'eval diary-remind-message ""))) | 1948 | (if (consp diary-entry) (setq diary-entry (cdr diary-entry))) |
| 1949 | (mapconcat 'eval diary-remind-message "")))) | ||
| 1949 | ;; Diary entry may apply to one of a list of days before date. | 1950 | ;; Diary entry may apply to one of a list of days before date. |
| 1950 | ((and (listp days) days) | 1951 | ((and (listp days) days) |
| 1951 | (or (diary-remind sexp (car days) marking) | 1952 | (or (diary-remind sexp (car days) marking) |