*** emacs/lisp/calendar/diary-lib.el.~1.195.~ 2009-11-12 22:21:21.000000000 +0100 --- emacs/lisp/calendar/diary-lib.el 2009-12-01 17:07:35.000000000 +0100 *************** *** 648,682 **** (if symbol (regexp-quote symbol) "") (mapconcat 'eval date-form "\\)\\(?:"))) entry-start date-start temp) ! (goto-char (point-min)) ! (while (re-search-forward regexp nil t) ! (if backup (re-search-backward "\\<" nil t)) ! ;; regexp moves us past the end of date, onto the next line. ! ;; Trailing whitespace after date not allowed (see diary-file). ! (if (and (bolp) (not (looking-at "[ \t]"))) ! ;; Diary entry that consists only of date. ! (backward-char 1) ! ;; Found a nonempty diary entry--make it ! ;; visible and add it to the list. ! (setq date-start (line-end-position 0)) ! ;; Actual entry starts on the next-line? ! (if (looking-at "[ \t]*\n[ \t]") (forward-line 1)) ! (setq entry-found t ! entry-start (point)) ! (forward-line 1) ! (while (looking-at "[ \t]") ; continued entry ! (forward-line 1)) ! (unless (and (eobp) (not (bolp))) ! (backward-char 1)) ! (unless list-only ! (remove-overlays date-start (point) 'invisible 'diary)) ! (setq temp (diary-pull-attrs ! (buffer-substring-no-properties ! entry-start (point)) globattr)) ! (diary-add-to-list ! (or gdate date) (car temp) ! (buffer-substring-no-properties (1+ date-start) (1- entry-start)) ! (copy-marker entry-start) (cadr temp)))))) entry-found)) (defvar original-date) ; from diary-list-entries --- 648,684 ---- (if symbol (regexp-quote symbol) "") (mapconcat 'eval date-form "\\)\\(?:"))) entry-start date-start temp) ! (save-restriction ! (widen) ! (goto-char (point-min)) ! (while (re-search-forward regexp nil t) ! (if backup (re-search-backward "\\<" nil t)) ! ;; regexp moves us past the end of date, onto the next line. ! ;; Trailing whitespace after date not allowed (see diary-file). ! (if (and (bolp) (not (looking-at "[ \t]"))) ! ;; Diary entry that consists only of date. ! (backward-char 1) ! ;; Found a nonempty diary entry--make it ! ;; visible and add it to the list. ! (setq date-start (line-end-position 0)) ! ;; Actual entry starts on the next-line? ! (if (looking-at "[ \t]*\n[ \t]") (forward-line 1)) ! (setq entry-found t ! entry-start (point)) ! (forward-line 1) ! (while (looking-at "[ \t]") ; continued entry ! (forward-line 1)) ! (unless (and (eobp) (not (bolp))) ! (backward-char 1)) ! (unless list-only ! (remove-overlays date-start (point) 'invisible 'diary)) ! (setq temp (diary-pull-attrs ! (buffer-substring-no-properties ! entry-start (point)) globattr)) ! (diary-add-to-list ! (or gdate date) (car temp) ! (buffer-substring-no-properties (1+ date-start) (1- entry-start)) ! (copy-marker entry-start) (cadr temp))))))) entry-found)) (defvar original-date) ; from diary-list-entries