]> git.eshelyaron.com Git - emacs.git/commitdiff
(mark-diary-entries): Move some constant variables outside the
authorGlenn Morris <rgm@gnu.org>
Fri, 14 Mar 2008 02:53:03 +0000 (02:53 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 14 Mar 2008 02:53:03 +0000 (02:53 +0000)
diary-date-forms loop.

lisp/ChangeLog
lisp/calendar/diary-lib.el

index 67cb5bd79aa37aba59848960d70527e92c513a22..c23fdcd9db887e95f463bc4fa224bd28b8a230f7 100644 (file)
@@ -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).
index 138d54c2c3c174ef86abefff36b4f41a214df357..dae56f9428d9d936e9b026043206d8b2b1bf69be 100644 (file)
@@ -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))))