GNU bug report logs -
#56185
29.0.50; imenu with imenu-use-popup-menu fails for *Rescan* item
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Fri, 24 Jun 2022 11:50:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 56185 <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> When imenu-use-popup-menu is non-nil and one selects the *Rescan* item,
> imenu fails with the following backtrace,
>
> Debugger entered--Lisp error: (error "Invalid `key-parse' syntax: %S" ["*Rescan*"])
> lookup-key((keymap "sh" ("*Rescan*" "*Rescan*" . #f(compiled-function () (interactive nil) #<bytecode -0x1823bf90e9c446ac>)) ("x" "x" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7dca5348>)) ("y" "y" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7da17348>))) ["*Rescan*"])
> popup-menu((keymap "sh" ("*Rescan*" "*Rescan*" . #f(compiled-function () (interactive nil) #<bytecode -0x1823bf90e9c446ac>)) ("x" "x" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7dca5348>)) ("y" "y" . #f(compiled-function () (interactive nil) #<bytecode -0x19fbbb6b7da17348>))) 105)
> imenu--mouse-menu((("*Rescan*" . -99) ("x" . #<marker at 1 in sh>) ("y" . #<marker at 7 in sh>)) 105)
I think something has gone missing here over the years? Or I'm
misreading the commits; that's also possible.
We basically end up with this:
(lookup-key
'(keymap "sh"
("*Rescan*" "*Rescan*" . ignore))
["*Rescan*"])
Which now signals an error; in Emacs 28 it just silently returned nil.
But the problem here is that that's not a valid menu syntax -- the first
element should be a symbol, not a string. So I've now fixed that in
Emacs 29, which makes this work. But I'm wondering whether there's
something more er fundamentally wrong somewhere...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.