]> code.delx.au - gnu-emacs/commitdiff
* lisp/vc/vc.el (vc-next-action): Fix inf-loop.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Mon, 4 Feb 2013 21:23:15 +0000 (16:23 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Feb 2013 21:23:15 +0000 (16:23 -0500)
(vc-update-change-log): Use dolist.

Fixes: debbugs:13610
lisp/ChangeLog
lisp/vc/vc.el

index 9a7a48b186a817b32aee3e0114df183d204dabb4..671bd6bdf3fa58ba312c031f65bda1251de8dec3 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-04  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+       * vc/vc.el (vc-next-action): Fix inf-loop (bug#13610).
+       (vc-update-change-log): Use dolist.
+
 2013-02-04  Chong Yidong  <cyd@gnu.org>
 
        * thingatpt.el: Rewrite the URL detection routines, absorbing some
 2013-02-04  Chong Yidong  <cyd@gnu.org>
 
        * thingatpt.el: Rewrite the URL detection routines, absorbing some
        (thing-at-point-newsgroup-heads)
        (thing-at-point-default-mail-uri-scheme): New variables.
        (thing-at-point-bounds-of-url-at-point): Rewrite.  Use ffap's
        (thing-at-point-newsgroup-heads)
        (thing-at-point-default-mail-uri-scheme): New variables.
        (thing-at-point-bounds-of-url-at-point): Rewrite.  Use ffap's
-       method to find the possible bounds of the URI at point.  New
-       optional argument to find ill-formed URIs.
+       method to find the possible bounds of the URI at point.
+       New optional argument to find ill-formed URIs.
        (thing-at-point-url-at-point): Rewrite.  New arguments for finding
        ill-formed URIs.  Use thing-at-point-bounds-of-url-at-point, and
        the scheme-adding heuristics from ffap-url-at-point.
        (thing-at-point-url-at-point): Rewrite.  New arguments for finding
        ill-formed URIs.  Use thing-at-point-bounds-of-url-at-point, and
        the scheme-adding heuristics from ffap-url-at-point.
-       (thing-at-point--bounds-of-well-formed-url): New function.  Do
-       parens matching to decide whether to include parens in the URI
+       (thing-at-point--bounds-of-well-formed-url): New function.
+       Do parens matching to decide whether to include parens in the URI
        (Bug#9153).
 
        * ffap.el: Require thingatpt.
        (Bug#9153).
 
        * ffap.el: Require thingatpt.
@@ -41,8 +46,8 @@
        (tramp-handle-insert-file-contents): Use `visit' when inserting
        the local copy.
 
        (tramp-handle-insert-file-contents): Use `visit' when inserting
        the local copy.
 
-       * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime): Use
-       `remote-file-name-inhibit-cache'.
+       * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime):
+       Use `remote-file-name-inhibit-cache'.
 
 2013-02-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 
 2013-02-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
index 9b8b94916c4fcc8c1a5af48f7acf897cb5527ce7..a0ef6f9d6d7b7d85e33d13b444b1cb630fdd74f7 100644 (file)
@@ -1079,15 +1079,13 @@ For old-style locking-based version control systems, like RCS:
     ;; If a buffer has unsaved changes, a checkout would discard those
     ;; changes, so treat the buffer as having unlocked changes.
     (when (and (not (eq model 'implicit)) (eq state 'up-to-date))
     ;; If a buffer has unsaved changes, a checkout would discard those
     ;; changes, so treat the buffer as having unlocked changes.
     (when (and (not (eq model 'implicit)) (eq state 'up-to-date))
-      (let ((files files))
-       (while files
-         (let ((buffer (get-file-buffer (car files))))
-           (and buffer
-                (buffer-modified-p buffer)
-                (setq state 'unlocked-changes
-                      files nil))))))
-
-    ;; Do the right thing
+      (dolist (file files)
+        (let ((buffer (get-file-buffer file)))
+          (and buffer
+               (buffer-modified-p buffer)
+               (setq state 'unlocked-changes)))))
+
+    ;; Do the right thing.
     (cond
      ((eq state 'missing)
       (error "Fileset files are missing, so cannot be operated on"))
     (cond
      ((eq state 'missing)
       (error "Fileset files are missing, so cannot be operated on"))
@@ -2667,14 +2665,11 @@ log entries should be gathered."
    (cond ((consp current-prefix-arg)   ;C-u
          (list buffer-file-name))
         (current-prefix-arg            ;Numeric argument.
    (cond ((consp current-prefix-arg)   ;C-u
          (list buffer-file-name))
         (current-prefix-arg            ;Numeric argument.
-         (let ((files nil)
-               (buffers (buffer-list))
-               file)
-           (while buffers
-             (setq file (buffer-file-name (car buffers)))
-             (and file (vc-backend file)
-                  (setq files (cons file files)))
-             (setq buffers (cdr buffers)))
+         (let ((files nil))
+            (dolist (buffer (buffer-list))
+             (let ((file (buffer-file-name buffer)))
+                (and file (vc-backend file)
+                     (setq files (cons file files)))))
            files))
         (t
           ;; Don't supply any filenames to backend; this means
            files))
         (t
           ;; Don't supply any filenames to backend; this means