Function: vc-kill-other-working-tree-buffers
vc-kill-other-working-tree-buffers is an autoloaded, interactive and
byte-compiled function defined in vc.el.gz.
Signature
(vc-kill-other-working-tree-buffers BACKEND)
Documentation
Kill buffers visiting versions of this file in other working trees.
BACKEND is the VC backend.
This command kills the buffers that C-x v w w (vc-switch-working-tree) switches to,
except that this command works only in file-visiting buffers.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;;;###autoload
(defun vc-kill-other-working-tree-buffers (backend)
"Kill buffers visiting versions of this file in other working trees.
BACKEND is the VC backend.
This command kills the buffers that \\[vc-switch-working-tree] switches to,
except that this command works only in file-visiting buffers."
(interactive (list (vc-responsible-backend default-directory)))
(when (cdr uniquify-managed)
(cl-loop with trees = (vc-call-backend backend
'known-other-working-trees)
for item in uniquify-managed
for buf = (uniquify-item-buffer item)
when (and (not (eq buf (current-buffer)))
(cl-find (uniquify-item-dirname item) trees
:test #'file-in-directory-p))
do (kill-buffer buf))))