bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56430: [PATCH] fix broken `imenu--create-keymap` when an item is nil


From: Brennan Vincent
Subject: bug#56430: [PATCH] fix broken `imenu--create-keymap` when an item is nil
Date: Thu, 7 Jul 2022 10:26:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

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@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@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?

--





reply via email to

[Prev in Thread] Current Thread [Next in Thread]