diff options
| author | Glenn Morris | 2008-03-27 06:19:47 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-27 06:19:47 +0000 |
| commit | 566f5ae682c23d64d78b5942cef6398fd54ee1f9 (patch) | |
| tree | 3ef371001de970551b8968dbccee0557378f1e83 | |
| parent | 78d2cbe156de083987ff590d6cd83cb667e07c75 (diff) | |
| download | emacs-566f5ae682c23d64d78b5942cef6398fd54ee1f9.tar.gz emacs-566f5ae682c23d64d78b5942cef6398fd54ee1f9.zip | |
(diary-mark-entries-1): Fix position offsets in non-gregorian case.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 13 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f297ef1798a..5fab3c006b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | (diary-display-no-entries): New function. | 20 | (diary-display-no-entries): New function. |
| 21 | (simple-diary-display, fancy-diary-display): Use it. | 21 | (simple-diary-display, fancy-diary-display): Use it. |
| 22 | (fancy-diary-display): Doc fix. Remove unneeded local entry-list. | 22 | (fancy-diary-display): Doc fix. Remove unneeded local entry-list. |
| 23 | (diary-mark-entries-1): Fix position offsets in non-gregorian case. | ||
| 23 | 24 | ||
| 24 | 2008-03-26 Jay Belanger <jay.p.belanger@gmail.com> | 25 | 2008-03-26 Jay Belanger <jay.p.belanger@gmail.com> |
| 25 | 26 | ||
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 8a7fca4834c..139074916b4 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1108,24 +1108,21 @@ function that converts absolute dates to dates of the appropriate type. " | |||
| 1108 | (day "[0-9]+\\|\\*") | 1108 | (day "[0-9]+\\|\\*") |
| 1109 | (year "[0-9]+\\|\\*") | 1109 | (year "[0-9]+\\|\\*") |
| 1110 | (case-fold-search t) | 1110 | (case-fold-search t) |
| 1111 | ;; FIXME is this the right reason for 1 versus 2? | ||
| 1112 | ;; Should docs of symbols say must be single character? | ||
| 1113 | (inc (if symbol 2 1)) | ||
| 1114 | marks) | 1111 | marks) |
| 1115 | (dolist (date-form diary-date-forms) | 1112 | (dolist (date-form diary-date-forms) |
| 1116 | (if (eq (car date-form) 'backup) ; ignore 'backup directive | 1113 | (if (eq (car date-form) 'backup) ; ignore 'backup directive |
| 1117 | (setq date-form (cdr date-form))) | 1114 | (setq date-form (cdr date-form))) |
| 1118 | (let* ((l (length date-form)) | 1115 | (let* ((l (length date-form)) |
| 1119 | (d-name-pos (- l (length (memq 'dayname date-form)))) | 1116 | (d-name-pos (- l (length (memq 'dayname date-form)))) |
| 1120 | (d-name-pos (if (/= l d-name-pos) (+ inc d-name-pos))) | 1117 | (d-name-pos (if (/= l d-name-pos) (1+ d-name-pos))) |
| 1121 | (m-name-pos (- l (length (memq 'monthname date-form)))) | 1118 | (m-name-pos (- l (length (memq 'monthname date-form)))) |
| 1122 | (m-name-pos (if (/= l m-name-pos) (+ inc m-name-pos))) | 1119 | (m-name-pos (if (/= l m-name-pos) (1+ m-name-pos))) |
| 1123 | (d-pos (- l (length (memq 'day date-form)))) | 1120 | (d-pos (- l (length (memq 'day date-form)))) |
| 1124 | (d-pos (if (/= l d-pos) (+ inc d-pos))) | 1121 | (d-pos (if (/= l d-pos) (1+ d-pos))) |
| 1125 | (m-pos (- l (length (memq 'month date-form)))) | 1122 | (m-pos (- l (length (memq 'month date-form)))) |
| 1126 | (m-pos (if (/= l m-pos) (+ inc m-pos))) | 1123 | (m-pos (if (/= l m-pos) (1+ m-pos))) |
| 1127 | (y-pos (- l (length (memq 'year date-form)))) | 1124 | (y-pos (- l (length (memq 'year date-form)))) |
| 1128 | (y-pos (if (/= l y-pos) (+ inc y-pos))) | 1125 | (y-pos (if (/= l y-pos) (1+ y-pos))) |
| 1129 | (regexp (format "^%s\\(%s\\)" | 1126 | (regexp (format "^%s\\(%s\\)" |
| 1130 | (if symbol (regexp-quote symbol) "") | 1127 | (if symbol (regexp-quote symbol) "") |
| 1131 | (mapconcat 'eval date-form "\\)\\(")))) | 1128 | (mapconcat 'eval date-form "\\)\\(")))) |