diff options
| author | Glenn Morris | 2008-04-23 03:06:11 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-23 03:06:11 +0000 |
| commit | 968560df8db6f67a05ef40a069445dc705405d1c (patch) | |
| tree | f971ebc7425322ced08b4e59c05c814c544c9f58 | |
| parent | 418c2f01e1900ba427e51e21c0782b3d8a0e6633 (diff) | |
| download | emacs-968560df8db6f67a05ef40a069445dc705405d1c.tar.gz emacs-968560df8db6f67a05ef40a069445dc705405d1c.zip | |
(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>.
| -rw-r--r-- | lisp/ChangeLog | 33 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 39 |
2 files changed, 56 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88ee00d577d..afd182ec20d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,36 @@ | |||
| 1 | 2008-04-23 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * dframe.el (dframe-have-timer-flag): Drop support for Emacs without | ||
| 4 | timers. Doc fix. | ||
| 5 | (dframe-update-speed): Drop support for XEmacs < 20. | ||
| 6 | (dframe-frame-mode): Drop support for Emacs < 20. | ||
| 7 | (dframe-set-timer-internal): Drop support for Emacs without timers. | ||
| 8 | (dframe-popup-kludge): Use mouse-menu-major-mode-map if defined. | ||
| 9 | |||
| 10 | * ediff-init.el (ediff-check-version): Drop support for very old Emacs | ||
| 11 | versions. Add doc-string. Mark as obsolete. | ||
| 12 | |||
| 13 | * ps-def.el (ps-color-device): Drop support for XEmacs < 19.12. | ||
| 14 | |||
| 15 | * speedbar.el (speedbar-use-tool-tips-flag): Check for tooltip-mode, | ||
| 16 | rather than using an Emacs version test. | ||
| 17 | |||
| 18 | * tree-widget.el (tree-widget-image-enable): Use display-images-p | ||
| 19 | rather than an Emacs version test. | ||
| 20 | |||
| 21 | * calendar/cal-china.el (holiday-chinese-qingming) | ||
| 22 | (holiday-chinese-winter-solstice, holiday-chinese): New functions. | ||
| 23 | * calendar/calendar.el (calendar-chinese-all-holidays-flag): New. | ||
| 24 | * calendar/holidays.el (holiday-oriental-holidays): Add more holidays. | ||
| 25 | |||
| 26 | * calendar/cal-islam.el (holiday-islamic): Doc fix. | ||
| 27 | |||
| 28 | * calendar/calendar.el (calendar-other-dates): Add absolute date. | ||
| 29 | |||
| 30 | * calendar/diary-lib.el (diary-list-sexp-entries): Doc fix. | ||
| 31 | (diary-remind): Allow negative DAYS to represent a range 1:DAYS. | ||
| 32 | Suggested by Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>. | ||
| 33 | |||
| 1 | 2008-04-23 Nick Roberts <nickrob@snap.net.nz> | 34 | 2008-04-23 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 35 | ||
| 3 | * progmodes/gdb-ui.el (gdb-previous-frame-address): Rename... | 36 | * progmodes/gdb-ui.el (gdb-previous-frame-address): Rename... |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 54c99e30346..a62af9169ed 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1635,8 +1635,9 @@ DAY MONTH YEAR in the European style). | |||
| 1635 | %%(diary-remind SEXP DAYS &optional MARKING) text | 1635 | %%(diary-remind SEXP DAYS &optional MARKING) text |
| 1636 | Entry is a reminder for diary sexp SEXP. DAYS is either a | 1636 | Entry is a reminder for diary sexp SEXP. DAYS is either a |
| 1637 | single number or a list of numbers indicating the number(s) | 1637 | single number or a list of numbers indicating the number(s) |
| 1638 | of days before the event that the warning(s) should occur. If | 1638 | of days before the event that the warning(s) should occur. |
| 1639 | the current date is (one of) DAYS before the event indicated | 1639 | A negative number -DAYS has the same meaning as a list (1 2 ... DAYS). |
| 1640 | If the current date is (one of) DAYS before the event indicated | ||
| 1640 | by EXPR, then a suitable message (as specified by | 1641 | by EXPR, then a suitable message (as specified by |
| 1641 | `diary-remind-message') appears. In addition to the | 1642 | `diary-remind-message') appears. In addition to the |
| 1642 | reminders beforehand, the diary entry also appears on the | 1643 | reminders beforehand, the diary entry also appears on the |
| @@ -1915,21 +1916,27 @@ string to use when highlighting the day in the calendar." | |||
| 1915 | 1916 | ||
| 1916 | (defun diary-remind (sexp days &optional marking) | 1917 | (defun diary-remind (sexp days &optional marking) |
| 1917 | "Provide a reminder of a diary entry. | 1918 | "Provide a reminder of a diary entry. |
| 1918 | SEXP is a diary-sexp. DAYS is either a single number or a list of numbers | 1919 | SEXP is a diary-sexp. DAYS is either a single number or a list |
| 1919 | indicating the number(s) of days before the event that the warning(s) should | 1920 | of numbers indicating the number(s) of days before the event that |
| 1920 | occur on. If the current date is (one of) DAYS before the event indicated by | 1921 | the warning(s) should occur on. A negative number -DAYS has the |
| 1921 | SEXP, then a suitable message (as specified by `diary-remind-message' is | 1922 | same meaning as a list (1 2 ... DAYS). If the current date |
| 1922 | returned. | 1923 | is (one of) DAYS before the event indicated by SEXP, then this function |
| 1923 | 1924 | returns a suitable message (as specified by `diary-remind-message'). | |
| 1924 | In addition to the reminders beforehand, the diary entry also appears on the | 1925 | |
| 1925 | date itself. | 1926 | In addition to the reminders beforehand, the diary entry also |
| 1926 | 1927 | appears on the date itself. | |
| 1927 | A `diary-nonmarking-symbol' at the beginning of the line of the `diary-remind' | 1928 | |
| 1928 | entry specifies that the diary entry (not the reminder) is non-marking. | 1929 | A `diary-nonmarking-symbol' at the beginning of the line of the |
| 1929 | Marking of reminders is independent of whether the entry itself is a marking | 1930 | `diary-remind' entry specifies that the diary entry (not the |
| 1930 | or nonmarking; if optional parameter MARKING is non-nil then the reminders are | 1931 | reminder) is non-marking. Marking of reminders is independent of |
| 1931 | marked on the calendar." | 1932 | whether the entry itself is a marking or nonmarking; if optional |
| 1933 | parameter MARKING is non-nil then the reminders are marked on the | ||
| 1934 | calendar." | ||
| 1932 | ;; `date' has a value at this point, from diary-sexp-entry. | 1935 | ;; `date' has a value at this point, from diary-sexp-entry. |
| 1936 | ;; Convert a negative number to a list of days. | ||
| 1937 | (and (integerp days) | ||
| 1938 | (< days 0) | ||
| 1939 | (setq days (number-sequence 1 (- days)))) | ||
| 1933 | (let ((diary-entry (eval sexp))) | 1940 | (let ((diary-entry (eval sexp))) |
| 1934 | (cond | 1941 | (cond |
| 1935 | ;; Diary entry applies on date. | 1942 | ;; Diary entry applies on date. |