diff options
| author | Dmitry Gutov | 2023-06-24 05:57:18 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2023-06-24 05:57:32 +0300 |
| commit | fdc1a12ed1a2ceaebf21ec68752e85dd4527ceab (patch) | |
| tree | 3800eaf4b2bbd427fa48a8bdfebb940be66654eb | |
| parent | d507aa7336b0a295a1fde1676c1606ae7f836a95 (diff) | |
| download | emacs-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.el | 13 |
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 | |||
| 1121 | the returned list. | 1121 | the returned list. |
| 1122 | 1122 | ||
| 1123 | BEWARE: this function may change the current buffer." | 1123 | BEWARE: 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 |