diff options
| author | Richard M. Stallman | 1997-07-04 04:44:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-04 04:44:29 +0000 |
| commit | 9f596b33c7d2d7c92e0418a27b1baaf9d5ddaca6 (patch) | |
| tree | f0f02102401ee3b6a058ebe2f84f4d5daaabe21d | |
| parent | 205d354f266123cc2fd9a23970129933ead6d19e (diff) | |
| download | emacs-9f596b33c7d2d7c92e0418a27b1baaf9d5ddaca6.tar.gz emacs-9f596b33c7d2d7c92e0418a27b1baaf9d5ddaca6.zip | |
(diary-float): Fix errors in previous change.
| -rw-r--r-- | lisp/calendar/diary-lib.el | 55 |
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." | |||
| 1197 | (m2 (extract-calendar-month last)) | 1197 | (m2 (extract-calendar-month last)) |
| 1198 | (d2 (extract-calendar-day last)) | 1198 | (d2 (extract-calendar-day last)) |
| 1199 | (y2 (extract-calendar-year last))) | 1199 | (y2 (extract-calendar-year last))) |
| 1200 | (or (and (= m1 m2); only possible base dates in one month | 1200 | (if (or (and (= m1 m2) ; only possible base dates in one month |
| 1201 | (or (and (listp month) (memq m1 month)) | 1201 | (or (and (listp month) (memq m1 month)) |
| 1202 | (= m1 month) | 1202 | (eq month t) |
| 1203 | (eq month t)) | 1203 | (= m1 month)) |
| 1204 | (let ((d (or day (if (> n 0) | 1204 | (let ((d (or day (if (> n 0) |
| 1205 | 1 | 1205 | 1 |
| 1206 | (calendar-last-day-of-month m1 y1))))) | 1206 | (calendar-last-day-of-month m1 y1))))) |
| 1207 | (and (<= d1 day) (<= day d2)))) | 1207 | (and (<= d1 d) (<= d d2)))) |
| 1208 | (and (< m1 m2); only possible base dates straddle two months | 1208 | ;; only possible base dates straddle two months |
| 1209 | (or | 1209 | (and (< m1 m2) |
| 1210 | ; m1, d1 works is a base date | 1210 | (or |
| 1211 | (and | 1211 | ;; m1, d1 works is a base date |
| 1212 | (or (and (listp month) (memq m1 month)) | 1212 | (and |
| 1213 | (= m1 month) | 1213 | (or (and (listp month) (memq m1 month)) |
| 1214 | (eq month t)) | 1214 | (eq month t) |
| 1215 | (<= d1 (or day (if (> n 0) | 1215 | (= m1 month)) |
| 1216 | 1 | 1216 | (<= d1 (or day (if (> n 0) |
| 1217 | (calendar-last-day-of-month m1 y1))))) | 1217 | 1 |
| 1218 | ; m2, d2 works is a base date | 1218 | (calendar-last-day-of-month m1 y1))))) |
| 1219 | (and (or (and (listp month) (memq m2 month)) | 1219 | ;; m2, d2 works is a base date |
| 1220 | (= m2 month) | 1220 | (and (or (and (listp month) (memq m2 month)) |
| 1221 | (eq month t)) | 1221 | (eq month t) |
| 1222 | (<= (or day (if (> n 0) | 1222 | (= m2 month)) |
| 1223 | 1 | 1223 | (<= (or day (if (> n 0) |
| 1224 | (calendar-last-day-of-month m2 y2))) | 1224 | 1 |
| 1225 | d2))))) | 1225 | (calendar-last-day-of-month m2 y2))) |
| 1226 | entry))) | 1226 | d2))))) |
| 1227 | entry)))) | ||
| 1227 | 1228 | ||
| 1228 | (defun diary-anniversary (month day year) | 1229 | (defun diary-anniversary (month day year) |
| 1229 | "Anniversary diary entry. | 1230 | "Anniversary diary entry. |