aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/vc/vc.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 76ba024c209..229ec112bed 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -3664,7 +3664,8 @@ to the working revision (except for keyword expansion)."
3664 ;; If any of the files is visited by the current buffer, make sure 3664 ;; If any of the files is visited by the current buffer, make sure
3665 ;; buffer is saved. If the user says `no', abort since we cannot 3665 ;; buffer is saved. If the user says `no', abort since we cannot
3666 ;; show the changes and ask for confirmation to discard them. 3666 ;; show the changes and ask for confirmation to discard them.
3667 (when (or (not files) (memq (buffer-file-name) files)) 3667 (when-let* ((n (buffer-file-name))
3668 ((or (not files) (member n files))))
3668 (vc-buffer-sync nil)) 3669 (vc-buffer-sync nil))
3669 (save-some-buffers nil (lambda () 3670 (save-some-buffers nil (lambda ()
3670 (and-let* ((n (buffer-file-name))) 3671 (and-let* ((n (buffer-file-name)))