summaryrefslogtreecommitdiff
path: root/lisp/type-break.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-07-01 14:21:09 -0400
committerGlenn Morris <rgm@gnu.org>2011-07-01 14:21:09 -0400
commit3de63bf809c2a36a5eae8e7383b2590c5ab1bcf7 (patch)
tree65fb2643e428a9abb1888d5305287f724fad137b /lisp/type-break.el
parentd224ac8375ca4fc8402fccf72a3666a9777be197 (diff)
downloademacs-3de63bf809c2a36a5eae8e7383b2590c5ab1bcf7.tar.gz
* lisp/type-break.el (type-break-time-sum): Use dolist.
This avoids using a free variable.
Diffstat (limited to 'lisp/type-break.el')
-rw-r--r--lisp/type-break.el7
1 files changed, 2 insertions, 5 deletions
diff --git a/lisp/type-break.el b/lisp/type-break.el
index a41fb1d423f..2d6960c77bc 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -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)