summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-04 04:44:29 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-04 04:44:29 +0000
commite3d75caa580f42c45592594364c6e4fab7f21521 (patch)
tree4223e3ab5255a662d29ecfb2fcefc231032b6543
parent20e28dc31a070a74d94195983397142734412799 (diff)
downloademacs-e3d75caa580f42c45592594364c6e4fab7f21521.tar.gz
(diary-float): Fix errors in previous change.
-rw-r--r--lisp/calendar/diary-lib.el55
1 files changed, 28 insertions, 27 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 70a03fa26d7..df469978c89 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1197,33 +1197,34 @@ An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY."
(m2 (extract-calendar-month last))
(d2 (extract-calendar-day last))
(y2 (extract-calendar-year last)))
- (or (and (= m1 m2); only possible base dates in one month
- (or (and (listp month) (memq m1 month))
- (= m1 month)
- (eq month t))
- (let ((d (or day (if (> n 0)
- 1
- (calendar-last-day-of-month m1 y1)))))
- (and (<= d1 day) (<= day d2))))
- (and (< m1 m2); only possible base dates straddle two months
- (or
- ; m1, d1 works is a base date
- (and
- (or (and (listp month) (memq m1 month))
- (= m1 month)
- (eq month t))
- (<= d1 (or day (if (> n 0)
- 1
- (calendar-last-day-of-month m1 y1)))))
- ; m2, d2 works is a base date
- (and (or (and (listp month) (memq m2 month))
- (= m2 month)
- (eq month t))
- (<= (or day (if (> n 0)
- 1
- (calendar-last-day-of-month m2 y2)))
- d2)))))
- entry)))
+ (if (or (and (= m1 m2) ; only possible base dates in one month
+ (or (and (listp month) (memq m1 month))
+ (eq month t)
+ (= m1 month))
+ (let ((d (or day (if (> n 0)
+ 1
+ (calendar-last-day-of-month m1 y1)))))
+ (and (<= d1 d) (<= d d2))))
+ ;; only possible base dates straddle two months
+ (and (< m1 m2)
+ (or
+ ;; m1, d1 works is a base date
+ (and
+ (or (and (listp month) (memq m1 month))
+ (eq month t)
+ (= m1 month))
+ (<= d1 (or day (if (> n 0)
+ 1
+ (calendar-last-day-of-month m1 y1)))))
+ ;; m2, d2 works is a base date
+ (and (or (and (listp month) (memq m2 month))
+ (eq month t)
+ (= m2 month))
+ (<= (or day (if (> n 0)
+ 1
+ (calendar-last-day-of-month m2 y2)))
+ d2)))))
+ entry))))
(defun diary-anniversary (month day year)
"Anniversary diary entry.