1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

Delete the old process in vc-setup-buffer

* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Delete the old
process here.
(vc-do-command): Rather than here (bug#20608).
This commit is contained in:
Dmitry Gutov 2015-05-28 02:16:00 +03:00
parent 550c65011c
commit cc41938ae0

View file

@ -171,6 +171,12 @@ Another is that undo information is not kept."
(let ((camefrom (current-buffer)) (let ((camefrom (current-buffer))
(olddir default-directory)) (olddir default-directory))
(set-buffer (get-buffer-create buf)) (set-buffer (get-buffer-create buf))
(let ((oldproc (get-buffer-process (current-buffer))))
;; If we wanted to wait for oldproc to finish before doing
;; something, we'd have used vc-eval-after.
;; Use `delete-process' rather than `kill-process' because we don't
;; want any of its output to appear from now on.
(when oldproc (delete-process oldproc)))
(kill-all-local-variables) (kill-all-local-variables)
(set (make-local-variable 'vc-parent-buffer) camefrom) (set (make-local-variable 'vc-parent-buffer) camefrom)
(set (make-local-variable 'vc-parent-buffer-name) (set (make-local-variable 'vc-parent-buffer-name)
@ -302,12 +308,6 @@ case, and the process object in the asynchronous case."
(eq buffer (current-buffer))) (eq buffer (current-buffer)))
(vc-setup-buffer buffer)) (vc-setup-buffer buffer))
;; If there's some previous async process still running, just kill it. ;; If there's some previous async process still running, just kill it.
(let ((oldproc (get-buffer-process (current-buffer))))
;; If we wanted to wait for oldproc to finish before doing
;; something, we'd have used vc-eval-after.
;; Use `delete-process' rather than `kill-process' because we don't
;; want any of its output to appear from now on.
(when oldproc (delete-process oldproc)))
(let ((squeezed (remq nil flags)) (let ((squeezed (remq nil flags))
(inhibit-read-only t) (inhibit-read-only t)
(status 0)) (status 0))