aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2015-05-28 02:16:00 +0300
committerDmitry Gutov2015-05-28 02:28:56 +0300
commitcc41938ae0f5694d657f360f19dd9ac166271db2 (patch)
treebda10511df5b3d0529edef99ee491f62a4512161
parent550c65011c7394e8ebcf91fc29af2984908279d1 (diff)
downloademacs-cc41938ae0f5694d657f360f19dd9ac166271db2.tar.gz
emacs-cc41938ae0f5694d657f360f19dd9ac166271db2.zip
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).
-rw-r--r--lisp/vc/vc-dispatcher.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index a2c1cba5fde..ec55867fcfe 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -171,6 +171,12 @@ Another is that undo information is not kept."
171 (let ((camefrom (current-buffer)) 171 (let ((camefrom (current-buffer))
172 (olddir default-directory)) 172 (olddir default-directory))
173 (set-buffer (get-buffer-create buf)) 173 (set-buffer (get-buffer-create buf))
174 (let ((oldproc (get-buffer-process (current-buffer))))
175 ;; If we wanted to wait for oldproc to finish before doing
176 ;; something, we'd have used vc-eval-after.
177 ;; Use `delete-process' rather than `kill-process' because we don't
178 ;; want any of its output to appear from now on.
179 (when oldproc (delete-process oldproc)))
174 (kill-all-local-variables) 180 (kill-all-local-variables)
175 (set (make-local-variable 'vc-parent-buffer) camefrom) 181 (set (make-local-variable 'vc-parent-buffer) camefrom)
176 (set (make-local-variable 'vc-parent-buffer-name) 182 (set (make-local-variable 'vc-parent-buffer-name)
@@ -302,12 +308,6 @@ case, and the process object in the asynchronous case."
302 (eq buffer (current-buffer))) 308 (eq buffer (current-buffer)))
303 (vc-setup-buffer buffer)) 309 (vc-setup-buffer buffer))
304 ;; If there's some previous async process still running, just kill it. 310 ;; If there's some previous async process still running, just kill it.
305 (let ((oldproc (get-buffer-process (current-buffer))))
306 ;; If we wanted to wait for oldproc to finish before doing
307 ;; something, we'd have used vc-eval-after.
308 ;; Use `delete-process' rather than `kill-process' because we don't
309 ;; want any of its output to appear from now on.
310 (when oldproc (delete-process oldproc)))
311 (let ((squeezed (remq nil flags)) 311 (let ((squeezed (remq nil flags))
312 (inhibit-read-only t) 312 (inhibit-read-only t)
313 (status 0)) 313 (status 0))