]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix apparent thinko in vc-next-action
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 6 Jun 2025 10:47:10 +0000 (11:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 20:01:46 +0000 (22:01 +0200)
* lisp/vc/vc.el (vc-next-action): Pass an argument to
buffer-modified-p because the loop does not set the current
buffer before calling that function.

(cherry picked from commit 8f85cf2ae93a089ea78f55915aa5f7c6776d3362)

lisp/vc/vc.el

index c55b268867d3b63f2d65f6ddec843f8b8058394a..5c61f9b605bf04d1702c9ad48d86e67eb2073396 100644 (file)
@@ -1552,8 +1552,8 @@ from which to check out the file(s)."
                         ;; said no to saving it; in that case, don't revert,
                         ;; because the user might intend to save after
                         ;; finishing the log entry and committing.
-                        (not (and visited (buffer-modified-p))))
-               (vc-revert-file file)
+                        (not (and visited (buffer-modified-p visited))))
+                (vc-revert-file file)
                (setq ready-for-commit (delete file ready-for-commit))))))
        ;; Remaining files need to be committed
        (if (not ready-for-commit)