# HG changeset patch # User Glenn Morris # Date 1206598773 0 # Node ID 487270d1d4da670d04d1329c3dcf84e5a538b300 # Parent 12975334805f35154bd6dddb7ecd75484ee2ad56 (diary-mark-entries-1): Fix position offsets in non-gregorian case. diff -r 12975334805f -r 487270d1d4da lisp/calendar/diary-lib.el --- a/lisp/calendar/diary-lib.el Thu Mar 27 06:12:25 2008 +0000 +++ b/lisp/calendar/diary-lib.el Thu Mar 27 06:19:33 2008 +0000 @@ -1108,24 +1108,21 @@ (day "[0-9]+\\|\\*") (year "[0-9]+\\|\\*") (case-fold-search t) - ;; FIXME is this the right reason for 1 versus 2? - ;; Should docs of symbols say must be single character? - (inc (if symbol 2 1)) marks) (dolist (date-form diary-date-forms) (if (eq (car date-form) 'backup) ; ignore 'backup directive (setq date-form (cdr date-form))) (let* ((l (length date-form)) (d-name-pos (- l (length (memq 'dayname date-form)))) - (d-name-pos (if (/= l d-name-pos) (+ inc d-name-pos))) + (d-name-pos (if (/= l d-name-pos) (1+ d-name-pos))) (m-name-pos (- l (length (memq 'monthname date-form)))) - (m-name-pos (if (/= l m-name-pos) (+ inc m-name-pos))) + (m-name-pos (if (/= l m-name-pos) (1+ m-name-pos))) (d-pos (- l (length (memq 'day date-form)))) - (d-pos (if (/= l d-pos) (+ inc d-pos))) + (d-pos (if (/= l d-pos) (1+ d-pos))) (m-pos (- l (length (memq 'month date-form)))) - (m-pos (if (/= l m-pos) (+ inc m-pos))) + (m-pos (if (/= l m-pos) (1+ m-pos))) (y-pos (- l (length (memq 'year date-form)))) - (y-pos (if (/= l y-pos) (+ inc y-pos))) + (y-pos (if (/= l y-pos) (1+ y-pos))) (regexp (format "^%s\\(%s\\)" (if symbol (regexp-quote symbol) "") (mapconcat 'eval date-form "\\)\\("))))