Let's do that again. Changelog: * imenu.el (imenu--subalist-p): Don't error on non-conses and allow non-lambda lists as functions. In my opinion a predicate should not throw an error. Anyway more important is the `non-lambda' lists part. (imenu--in-alist): Don't recurse into non-subalists. Looking at the commentary, the ability to embed functions in a menu has clearly been added after this functions was written. (imenu): Don't pass function itself as an argument. ,----[ (info "(elisp) Imenu") ] | Selecting a simple element has the effect of moving to position | INDEX-POSITION in the buffer. Special elements look like this: | | (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...) | | Selecting a special element performs: | | (funcall FUNCTION | INDEX-NAME INDEX-POSITION ARGUMENTS...) `---- (cddr index-item) == (FUNCTION . ARGS), is wrong as argument list, we need one more cdr. * doc/lispref/modes.texi: Make it clear that sub-alist is the cdr. -ap