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

From: Brennan Vincent <[email-masked]>
Date: Wed, 6 Jul 2022 15:45:45 -0400

---
 lisp/imenu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/imenu.el b/lisp/imenu.el
index 040e373fb4..0a0931a647 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -464,7 +464,7 @@ imenu--create-keymap
   `(keymap ,title
            ,@(mapcar
               (lambda (item)
-                `(,(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))
--
2.34.1