GNU bug report logs -
#56430
[PATCH] fix broken `imenu--create-keymap` when an item is nil
Previous Next
Reported by: Brennan Vincent <brennan <at> umanwizard.com>
Date: Wed, 6 Jul 2022 20:15:02 UTC
Severity: normal
Tags: moreinfo, patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 56430 <at> debbugs.gnu.org (full text, mbox):
I actually observed item itself being nil, not just (car item).
It happens in imenu-update-menubar, because imenu--make-index-alist
always produces (list nil) instead of just nil. The code is uncommented,
so I don't know the original reason for that logic, which you can see here:
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/imenu.el#n434
This was working fine until imenu--create-keymap was updated to call
intern, by your change on June 24th.
The practical consequence I observed was that lsp-mode stopped working
for Go.
On 7/7/22 04:59, Lars Ingebrigtsen wrote:
> Content preview: Brennan Vincent <brennan <at> umanwizard.com> writes: > - `(,(intern
> (car item)) ,(car item) > + `(,(and (car item) (intern (car item))) ,(car
> item) > ,@(cond > ((imenu--subalist-p item) > (imenu--create-keymap (car
> item) (cdr item) cmd))
>
> Content analysis details: (-2.9 points, 5.0 required)
>
> pts rule name description
> ---- ---------------------- --------------------------------------------------
> -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
> -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
> [score: 0.0000]
> X-Fes-Encrypted: true
> X-Fes-Ehlo-Domain: quimby.gnus.org
>
> Brennan Vincent <brennan <at> umanwizard.com> writes:
>
>> - `(,(intern (car item)) ,(car item)
>> + `(,(and (car item) (intern (car item))) ,(car item)
>> ,@(cond
>> ((imenu--subalist-p item)
>> (imenu--create-keymap (car item) (cdr item) cmd))
>
> In what cases is (car item) nil here? Isn't that a bug in the caller?
>
> --
This bug report was last modified 3 years and 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.