From: Brennan Vincent <brennan@umanwizard.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 56430@debbugs.gnu.org
Subject: bug#56430: [PATCH] fix broken `imenu--create-keymap` when an item is nil
Date: Thu, 7 Jul 2022 14:18:16 -0400 [thread overview]
Message-ID: <2ac26bde-ea5e-015c-e66a-ba1c090fa0a8@umanwizard.com> (raw)
In-Reply-To: <87y1x4er7h.fsf@gnus.org>
Yes. That fixes the issue I was observing, too. My original motivation
was that the lsp-mode was failing to launch for Golang files on master.
Both my diff and yours fix that problem.
I have no strong opinion on which diff is better.
On 2022-07-07 14:02, Lars Ingebrigtsen wrote:
> Content preview: Brennan Vincent <brennan@umanwizard.com> writes: > I actually
> observed item itself being nil, not just (car item). Does the following simple
> change fix the problem, then?
>
> 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:
>
>> I actually observed item itself being nil, not just (car item).
>
> Does the following simple change fix the problem, then?
>
> diff --git a/lisp/imenu.el b/lisp/imenu.el
> index 040e373fb4..dcd816cb7a 100644
> --- a/lisp/imenu.el
> +++ b/lisp/imenu.el
> @@ -471,7 +471,7 @@ imenu--create-keymap
> (t
> (lambda () (interactive)
> (if cmd (funcall cmd item) item))))))
> - alist)))
> + (seq-filter #'identity alist))))
>
> (defun imenu--in-alist (str alist)
> "Check whether the string STR is contained in multi-level ALIST."
>
>
> --
next prev parent reply other threads:[~2022-07-07 18:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 19:45 bug#56430: [PATCH] fix broken `imenu--create-keymap` when an item is nil Brennan Vincent
2022-07-07 8:59 ` Lars Ingebrigtsen
2022-07-07 14:26 ` Brennan Vincent
2022-07-07 18:02 ` Lars Ingebrigtsen
2022-07-07 18:18 ` Brennan Vincent [this message]
2022-07-07 18:22 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ac26bde-ea5e-015c-e66a-ba1c090fa0a8@umanwizard.com \
--to=brennan@umanwizard.com \
--cc=56430@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).