summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-08 11:57:29 -0700
committerTom Tromey <tromey@redhat.com>2013-03-08 11:57:29 -0700
commit71f91792e3013b397996905224f387da5cc539a9 (patch)
tree4c3d3ba909e76deea1cdf73b73fca67a57149465 /lisp/vc/vc.el
parent6f4de085f065e11f4df3195d47479f28f5ef08ba (diff)
parentb5426561089d39f18b42bed9dbfcb531f43ed562 (diff)
downloademacs-71f91792e3013b397996905224f387da5cc539a9.tar.gz
merge from trunk
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el29
1 files changed, 12 insertions, 17 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9b8b94916c4..a0ef6f9d6d7 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -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))
- (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"))
@@ -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.
- (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