* lisp/type-break.el (type-break-time-sum): Use dolist.
authorGlenn Morris <rgm@gnu.org>
Fri, 1 Jul 2011 18:21:09 +0000 (14:21 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 1 Jul 2011 18:21:09 +0000 (14:21 -0400)
This avoids using a free variable.

lisp/ChangeLog
lisp/type-break.el

index 69d6c88..a05c85f 100644 (file)
@@ -1,5 +1,7 @@
 2011-07-01  Glenn Morris  <rgm@gnu.org>
 
+       * type-break.el (type-break-time-sum): Use dolist.
+
        * textmodes/flyspell.el (flyspell-word-search-backward):
        Replace CL function.
 
index a41fb1d..2d6960c 100644 (file)
@@ -1009,13 +1009,10 @@ FRAC should be the inverse of the fractional value; for example, a value of
 ;; "low" bits and format the time incorrectly.
 (defun type-break-time-sum (&rest tmlist)
   (let ((sum '(0 0 0)))
-    (while tmlist
-      (setq tem (car tmlist))
-      (setq tmlist (cdr tmlist))
+    (dolist (tem tmlist sum)
       (setq sum (time-add sum (if (integerp tem)
                                  (list (floor tem 65536) (mod tem 65536))
-                               tem))))
-    sum))
+                               tem))))))
 
 (defun type-break-time-stamp (&optional when)
   (if (fboundp 'format-time-string)