mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(vc-ensure-vc-buffer): Avoid infinite looping when
vc-parent-buffer is the current buffer.
This commit is contained in:
parent
d6a4ad7475
commit
772111be13
1 changed files with 4 additions and 1 deletions
|
|
@ -1297,7 +1297,10 @@ Otherwise, throw an error."
|
|||
"Make sure that the current buffer visits a version-controlled file."
|
||||
(if vc-dired-mode
|
||||
(set-buffer (find-file-noselect (dired-get-filename)))
|
||||
(while vc-parent-buffer
|
||||
(while (and vc-parent-buffer
|
||||
;; Avoid infinite looping when vc-parent-buffer and
|
||||
;; current buffer are the same buffer.
|
||||
(not (eq vc-parent-buffer (current-buffer))))
|
||||
(set-buffer vc-parent-buffer))
|
||||
(if (not buffer-file-name)
|
||||
(error "Buffer %s is not associated with a file" (buffer-name))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue