emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v
Date: Tue, 24 Jul 2007 06:12:16 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/07/24 06:12:15

Index: calendar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/calendar.el,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -b -r1.200 -r1.201
--- calendar.el 15 Jul 2007 19:14:14 -0000      1.200
+++ calendar.el 24 Jul 2007 06:12:15 -0000      1.201
@@ -1343,7 +1343,9 @@
   (cons mon yr))
 
 (defmacro calendar-for-loop (var from init to final do &rest body)
-  "Execute a for loop."
+  "Execute a for loop.
+Evaluate BODY with VAR bound to successive integers from INIT to FINAL,
+inclusive."
   (declare (debug (symbolp "from" form "to" form "do" body)))
   `(let ((,var (1- ,init)))
     (while (>= ,final (setq ,var (1+ ,var)))
@@ -2110,7 +2112,7 @@
         displayed-year year)
   (erase-buffer)
   (increment-calendar-month month year -1)
-  (calendar-for-loop i from 0 to 2 do
+  (dotimes (i 3)
        (generate-calendar-month month year (+ 5 (* 25 i)))
        (increment-calendar-month month year 1)))
 
@@ -2133,7 +2135,7 @@
     indent t)
    (calendar-insert-indented "" indent);; Go to proper spot
    ;; Use the first two characters of each day to head the columns.
-   (calendar-for-loop i from 0 to 6 do
+   (dotimes (i 7)
       (insert
        (let ((string
               (calendar-day-name (mod (+ calendar-week-start-day i) 7) nil t)))
@@ -2144,7 +2146,7 @@
    (calendar-insert-indented "" 0 t);; Force onto following line
    (calendar-insert-indented "" indent);; Go to proper spot
    ;; Add blank days before the first of the month
-   (calendar-for-loop i from 1 to blank-days do (insert "   "))
+   (dotimes (idummy blank-days) (insert "   "))
    ;; Put in the days of the month
    (calendar-for-loop i from 1 to last do
       (insert (format "%2d " i))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]