[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v |
Date: |
Wed, 23 Apr 2008 03:05:54 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/04/23 03:05:54
Index: diary-lib.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/diary-lib.el,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -b -r1.170 -r1.171
--- diary-lib.el 16 Apr 2008 03:23:30 -0000 1.170
+++ diary-lib.el 23 Apr 2008 03:05:53 -0000 1.171
@@ -1635,8 +1635,9 @@
%%(diary-remind SEXP DAYS &optional MARKING) text
Entry is a reminder for diary sexp SEXP. DAYS is either a
single number or a list of numbers indicating the number(s)
- of days before the event that the warning(s) should occur. If
- the current date is (one of) DAYS before the event indicated
+ of days before the event that the warning(s) should occur.
+ A negative number -DAYS has the same meaning as a list (1 2 ... DAYS).
+ If the current date is (one of) DAYS before the event indicated
by EXPR, then a suitable message (as specified by
`diary-remind-message') appears. In addition to the
reminders beforehand, the diary entry also appears on the
@@ -1915,21 +1916,27 @@
(defun diary-remind (sexp days &optional marking)
"Provide a reminder of a diary entry.
-SEXP is a diary-sexp. DAYS is either a single number or a list of numbers
-indicating the number(s) of days before the event that the warning(s) should
-occur on. If the current date is (one of) DAYS before the event indicated by
-SEXP, then a suitable message (as specified by `diary-remind-message' is
-returned.
-
-In addition to the reminders beforehand, the diary entry also appears on the
-date itself.
-
-A `diary-nonmarking-symbol' at the beginning of the line of the `diary-remind'
-entry specifies that the diary entry (not the reminder) is non-marking.
-Marking of reminders is independent of whether the entry itself is a marking
-or nonmarking; if optional parameter MARKING is non-nil then the reminders are
-marked on the calendar."
+SEXP is a diary-sexp. DAYS is either a single number or a list
+of numbers indicating the number(s) of days before the event that
+the warning(s) should occur on. A negative number -DAYS has the
+same meaning as a list (1 2 ... DAYS). If the current date
+is (one of) DAYS before the event indicated by SEXP, then this function
+returns a suitable message (as specified by `diary-remind-message').
+
+In addition to the reminders beforehand, the diary entry also
+appears on the date itself.
+
+A `diary-nonmarking-symbol' at the beginning of the line of the
+`diary-remind' entry specifies that the diary entry (not the
+reminder) is non-marking. Marking of reminders is independent of
+whether the entry itself is a marking or nonmarking; if optional
+parameter MARKING is non-nil then the reminders are marked on the
+calendar."
;; `date' has a value at this point, from diary-sexp-entry.
+ ;; Convert a negative number to a list of days.
+ (and (integerp days)
+ (< days 0)
+ (setq days (number-sequence 1 (- days))))
(let ((diary-entry (eval sexp)))
(cond
;; Diary entry applies on date.
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, (continued)
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/06
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/06
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/09
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/11
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/15
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el,v, Glenn Morris, 2008/04/28