(diary-list-sexp-entries): Doc fix.

(diary-remind): Allow negative DAYS to represent a range 1:DAYS.
Suggested by Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>.
This commit is contained in:
Glenn Morris 2008-04-23 03:06:11 +00:00
parent 418c2f01e1
commit 968560df8d
2 changed files with 54 additions and 14 deletions

View file

@ -1,3 +1,36 @@
2008-04-23 Glenn Morris <rgm@gnu.org>
* dframe.el (dframe-have-timer-flag): Drop support for Emacs without
timers. Doc fix.
(dframe-update-speed): Drop support for XEmacs < 20.
(dframe-frame-mode): Drop support for Emacs < 20.
(dframe-set-timer-internal): Drop support for Emacs without timers.
(dframe-popup-kludge): Use mouse-menu-major-mode-map if defined.
* ediff-init.el (ediff-check-version): Drop support for very old Emacs
versions. Add doc-string. Mark as obsolete.
* ps-def.el (ps-color-device): Drop support for XEmacs < 19.12.
* speedbar.el (speedbar-use-tool-tips-flag): Check for tooltip-mode,
rather than using an Emacs version test.
* tree-widget.el (tree-widget-image-enable): Use display-images-p
rather than an Emacs version test.
* calendar/cal-china.el (holiday-chinese-qingming)
(holiday-chinese-winter-solstice, holiday-chinese): New functions.
* calendar/calendar.el (calendar-chinese-all-holidays-flag): New.
* calendar/holidays.el (holiday-oriental-holidays): Add more holidays.
* calendar/cal-islam.el (holiday-islamic): Doc fix.
* calendar/calendar.el (calendar-other-dates): Add absolute date.
* calendar/diary-lib.el (diary-list-sexp-entries): Doc fix.
(diary-remind): Allow negative DAYS to represent a range 1:DAYS.
Suggested by Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>.
2008-04-23 Nick Roberts <nickrob@snap.net.nz> 2008-04-23 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gdb-ui.el (gdb-previous-frame-address): Rename... * progmodes/gdb-ui.el (gdb-previous-frame-address): Rename...

View file

@ -1635,8 +1635,9 @@ DAY MONTH YEAR in the European style).
%%(diary-remind SEXP DAYS &optional MARKING) text %%(diary-remind SEXP DAYS &optional MARKING) text
Entry is a reminder for diary sexp SEXP. DAYS is either a Entry is a reminder for diary sexp SEXP. DAYS is either a
single number or a list of numbers indicating the number(s) single number or a list of numbers indicating the number(s)
of days before the event that the warning(s) should occur. If of days before the event that the warning(s) should occur.
the current date is (one of) DAYS before the event indicated 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 by EXPR, then a suitable message (as specified by
`diary-remind-message') appears. In addition to the `diary-remind-message') appears. In addition to the
reminders beforehand, the diary entry also appears on the reminders beforehand, the diary entry also appears on the
@ -1915,21 +1916,27 @@ string to use when highlighting the day in the calendar."
(defun diary-remind (sexp days &optional marking) (defun diary-remind (sexp days &optional marking)
"Provide a reminder of a diary entry. "Provide a reminder of a diary entry.
SEXP is a diary-sexp. DAYS is either a single number or a list of numbers SEXP is a diary-sexp. DAYS is either a single number or a list
indicating the number(s) of days before the event that the warning(s) should of numbers indicating the number(s) of days before the event that
occur on. If the current date is (one of) DAYS before the event indicated by the warning(s) should occur on. A negative number -DAYS has the
SEXP, then a suitable message (as specified by `diary-remind-message' is same meaning as a list (1 2 ... DAYS). If the current date
returned. 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 In addition to the reminders beforehand, the diary entry also
date itself. appears on the date itself.
A `diary-nonmarking-symbol' at the beginning of the line of the `diary-remind' A `diary-nonmarking-symbol' at the beginning of the line of the
entry specifies that the diary entry (not the reminder) is non-marking. `diary-remind' entry specifies that the diary entry (not the
Marking of reminders is independent of whether the entry itself is a marking reminder) is non-marking. Marking of reminders is independent of
or nonmarking; if optional parameter MARKING is non-nil then the reminders are whether the entry itself is a marking or nonmarking; if optional
marked on the calendar." parameter MARKING is non-nil then the reminders are marked on the
calendar."
;; `date' has a value at this point, from diary-sexp-entry. ;; `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))) (let ((diary-entry (eval sexp)))
(cond (cond
;; Diary entry applies on date. ;; Diary entry applies on date.