diff options
| author | Charles A. Roelli | 2017-12-20 20:40:14 +0100 |
|---|---|---|
| committer | Charles A. Roelli | 2017-12-20 20:40:14 +0100 |
| commit | 7d392ccd69f4925bb9990c8267a2b710c80ec5c5 (patch) | |
| tree | b25f378591290d00ac7e5d6b65806fd482e1bae2 | |
| parent | 615c5cf0a6ba64af1e66e39722bc01334d484dcc (diff) | |
| download | emacs-7d392ccd69f4925bb9990c8267a2b710c80ec5c5.tar.gz emacs-7d392ccd69f4925bb9990c8267a2b710c80ec5c5.zip | |
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
| -rw-r--r-- | lisp/vc/vc.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 211feddc55d..b1599915007 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." | |||
| 2422 | (file buffer-file-name) | 2422 | (file buffer-file-name) |
| 2423 | (backend (vc-backend file)) | 2423 | (backend (vc-backend file)) |
| 2424 | (buf (get-buffer-create "*VC-history*"))) | 2424 | (buf (get-buffer-create "*VC-history*"))) |
| 2425 | (unless backend | ||
| 2426 | (error "Buffer is not version controlled")) | ||
| 2425 | (with-current-buffer buf | 2427 | (with-current-buffer buf |
| 2426 | (setq-local vc-log-view-type 'long)) | 2428 | (setq-local vc-log-view-type 'long)) |
| 2427 | (vc-call region-history file buf lfrom lto) | 2429 | (vc-call region-history file buf lfrom lto) |