[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7d392cc 1/2: Ensure current buffer is version-contr
From: |
Charles A. Roelli |
Subject: |
[Emacs-diffs] master 7d392cc 1/2: Ensure current buffer is version-controlled in vc-region-history |
Date: |
Wed, 20 Dec 2017 15:06:40 -0500 (EST) |
branch: master
commit 7d392ccd69f4925bb9990c8267a2b710c80ec5c5
Author: Charles A. Roelli <address@hidden>
Commit: Charles A. Roelli <address@hidden>
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
---
lisp/vc/vc.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 211fedd..b159991 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -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)