aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2023-06-24 05:57:18 +0300
committerDmitry Gutov2023-06-24 05:57:32 +0300
commitfdc1a12ed1a2ceaebf21ec68752e85dd4527ceab (patch)
tree3800eaf4b2bbd427fa48a8bdfebb940be66654eb
parentd507aa7336b0a295a1fde1676c1606ae7f836a95 (diff)
downloademacs-fdc1a12ed1a2ceaebf21ec68752e85dd4527ceab.tar.gz
emacs-fdc1a12ed1a2ceaebf21ec68752e85dd4527ceab.zip
Fix "vc-print-log does not erase buffer" and associated problems
* lisp/vc/vc.el (vc-deduce-fileset): Make sure to retain the buffer switch (if it did), bug#63949.
-rw-r--r--lisp/vc/vc.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 1144a23f317..410fe5c01e1 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1121,10 +1121,15 @@ possible values of STATE are explained in `vc-state', and MODEL in
1121the returned list. 1121the returned list.
1122 1122
1123BEWARE: this function may change the current buffer." 1123BEWARE: this function may change the current buffer."
1124 (with-current-buffer (or (buffer-base-buffer) (current-buffer)) 1124 (let (new-buf res)
1125 (vc-deduce-fileset-1 not-state-changing 1125 (with-current-buffer (or (buffer-base-buffer) (current-buffer))
1126 allow-unregistered 1126 (setq res
1127 state-model-only-files))) 1127 (vc-deduce-fileset-1 not-state-changing
1128 allow-unregistered
1129 state-model-only-files))
1130 (setq new-buf (current-buffer)))
1131 (set-buffer new-buf)
1132 res))
1128 1133
1129(defun vc-deduce-fileset-1 (not-state-changing 1134(defun vc-deduce-fileset-1 (not-state-changing
1130 allow-unregistered 1135 allow-unregistered