Commit f52e8e86 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(mark-diary-entries): Don't move point. Use with-syntax-table and dolist.

parent 23006f3e
2005-09-16 Stefan Monnier <>
* calendar/diary-lib.el (mark-diary-entries): Don't move point.
Use with-syntax-table and dolist.
2005-09-16 Carsten Dominik <>
* textmodes/reftex-auc.el:
......@@ -865,18 +865,15 @@ diary entries."
(let ((marking-diary-entries t)
file-glob-attrs marks)
(with-current-buffer (find-file-noselect (diary-check-diary-file) t)
(setq mark-diary-entries-in-calendar t)
(message "Marking diary entries...")
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
(let ((d diary-date-forms)
(old-diary-syntax-table (syntax-table))
(set-syntax-table diary-syntax-table)
(while d
(let* ((date-form (if (equal (car (car d)) 'backup)
(cdr (car d))
(car d)));; ignore 'backup directive
(with-syntax-table diary-syntax-table
(dolist (date-form diary-date-forms)
(if (eq (car date-form) 'backup)
(setq date-form (cdr date-form))) ;; ignore 'backup directive
(let* ((dayname
(diary-name-pattern calendar-day-name-array
......@@ -937,12 +934,11 @@ diary entries."
(+ y 100)
(string-to-number y-str)))))
(setq entry (buffer-substring-no-properties
(let ((tmp (diary-pull-attrs (buffer-substring-no-properties
(point) (line-end-position))
temp (diary-pull-attrs entry file-glob-attrs)
entry (nth 0 temp)
marks (nth 1 temp)))
(setq entry (nth 0 tmp)
marks (nth 1 tmp)))
(if dd-name
(cdr (assoc-string
......@@ -958,12 +954,10 @@ diary entries."
1 nil calendar-month-abbrev-array) t)))))
(mark-calendar-date-pattern mm dd yy marks))))
(setq d (cdr d))))
(mark-calendar-date-pattern mm dd yy marks))))))
(run-hooks 'nongregorian-diary-marking-hook
(set-syntax-table old-diary-syntax-table)
(message "Marking diary entries...done")))))
(defun mark-sexp-diary-entries ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment