From: Glenn Morris Date: Fri, 14 Mar 2008 02:53:03 +0000 (+0000) Subject: (mark-diary-entries): Move some constant variables outside the X-Git-Tag: emacs-pretest-23.0.90~7174 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75762c68d6057213331609f5a60608dbb79bfc3c;p=emacs.git (mark-diary-entries): Move some constant variables outside the diary-date-forms loop. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67cb5bd79aa..c23fdcd9db8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,13 @@ * startup.el (command-line-1): Rename -internal-script back to -scriptload (reverts previous change). + * calendar/cal-coptic.el (coptic-calendar-month-name-array): + (ethiopic-calendar-month-name-array, ethiopic-name): Add doc strings. + (coptic-prompt-for-date): Move definition before use. + + * calendar/diary-lib.el (mark-diary-entries): Move some constant + variables outside the diary-date-forms loop. + * calendar/calendar.el (diary-file): Doc fix. (calendar-buffer-list): Return buffers rather than strings (fixes previous change). diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 138d54c2c3c..dae56f9428d 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1094,6 +1094,16 @@ diary entries." (setq mark-diary-entries-in-calendar nil) (redraw-calendar)) (let ((marking-diary-entries t) + (dayname + (diary-name-pattern calendar-day-name-array + calendar-day-abbrev-array)) + (monthname + (format "%s\\|\\*" + (diary-name-pattern calendar-month-name-array + calendar-month-abbrev-array))) + (month "[0-9]+\\|\\*") + (day "[0-9]+\\|\\*") + (year "[0-9]+\\|\\*") file-glob-attrs marks) (with-current-buffer (find-file-noselect (diary-check-diary-file) t) (save-excursion @@ -1105,17 +1115,7 @@ diary entries." (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 - calendar-day-abbrev-array)) - (monthname - (format "%s\\|\\*" - (diary-name-pattern calendar-month-name-array - calendar-month-abbrev-array))) - (month "[0-9]+\\|\\*") - (day "[0-9]+\\|\\*") - (year "[0-9]+\\|\\*") - (l (length date-form)) + (let* ((l (length date-form)) (d-name-pos (- l (length (memq 'dayname date-form)))) (d-name-pos (if (/= l d-name-pos) (+ 1 d-name-pos))) (m-name-pos (- l (length (memq 'monthname date-form))))