mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
vc-revert: Fix calling vc-buffer-sync (bug#79319)
* lisp/vc/vc.el (vc-revert): Don't call vc-buffer-sync on a non-file-visiting buffer (bug#79319). Don't try to use memq to compare strings.
This commit is contained in:
parent
11dc1420e4
commit
0cd0aaa14f
1 changed files with 2 additions and 1 deletions
|
|
@ -3664,7 +3664,8 @@ to the working revision (except for keyword expansion)."
|
|||
;; If any of the files is visited by the current buffer, make sure
|
||||
;; buffer is saved. If the user says `no', abort since we cannot
|
||||
;; show the changes and ask for confirmation to discard them.
|
||||
(when (or (not files) (memq (buffer-file-name) files))
|
||||
(when-let* ((n (buffer-file-name))
|
||||
((or (not files) (member n files))))
|
||||
(vc-buffer-sync nil))
|
||||
(save-some-buffers nil (lambda ()
|
||||
(and-let* ((n (buffer-file-name)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue