[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63689: 29.0.91; vc-annotate-mode-menu: Cannot open file vc-nil
From: |
Juri Linkov |
Subject: |
bug#63689: 29.0.91; vc-annotate-mode-menu: Cannot open file vc-nil |
Date: |
Wed, 24 May 2023 19:09:40 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
0. emacs-29 -Q
1. Eval:
(context-menu-mode)
(setq debug-on-error t)
(require 'vc-annotate)
2. Open any vc-controlled file and type 'C-x v g' (vc-annotate)
3. Click the right mouse button for Context menu with "VC-Annotate" submenu
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such
file or directory" "vc-nil")
vc-find-backend-function(nil revision-granularity)
vc-call-backend(nil revision-granularity)
(eq 'repository (vc-call-backend nil 'revision-granularity))
The error is caused by 'vc-annotate-mode-menu' that contains:
(keymap "VC-Annotate" ...
(Show\ changeset\ diff\ of\ revision\ at\ line
menu-item
"Show changeset diff of revision at line"
vc-annotate-show-changeset-diff-revision-at-line
:enable (eq 'repository (vc-call-backend nil 'revision-granularity))
Note how it tries to use the backend 'nil'.
This is because 'vc-annotate-backend' is evaluated when calling
(require 'vc-annotate) in the *scratch* buffer where it's nil.
Here is the fix for emacs-29:
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index 70057a6aac7..d83660f9d79 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -330,7 +330,7 @@ vc-annotate-mode-menu
["Show changeset diff of revision at line"
vc-annotate-show-changeset-diff-revision-at-line
:enable
- (eq 'repository (vc-call-backend ,vc-annotate-backend
'revision-granularity))
+ (eq 'repository (vc-call-backend vc-annotate-backend
'revision-granularity))
:help "Visit the diff of the revision at line from its previous revision"]
["Visit revision at line" vc-annotate-find-revision-at-line
:help "Visit the revision identified in the current line"]))
- bug#63689: 29.0.91; vc-annotate-mode-menu: Cannot open file vc-nil,
Juri Linkov <=