1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Ensure current buffer is version-controlled in vc-region-history

* lisp/vc/vc.el (vc-region-history): Ensure buffer is
version-controlled.  Otherwise if a user runs it in a
non-version-controlled buffer, they get the error:

  Cannot open load file: No such file or directory, vc-nil
This commit is contained in:
Charles A. Roelli 2017-12-20 20:40:14 +01:00
parent 615c5cf0a6
commit 7d392ccd69

View file

@ -2422,6 +2422,8 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
(file buffer-file-name)
(backend (vc-backend file))
(buf (get-buffer-create "*VC-history*")))
(unless backend
(error "Buffer is not version controlled"))
(with-current-buffer buf
(setq-local vc-log-view-type 'long))
(vc-call region-history file buf lfrom lto)