Dmitry Gutov writes: > One note: > >>> Is it possible for (cadr item) to be a list and also be `functionp' and yet not >>> have its car be `lambda'? > > The documentation allows FUNCTION in the third element, but > imenu--subalist-p' is checking whether the second element is a > function. Yes, this doesn't make much sense. I guess this function check was intended to distinguish a special element (INDEX-NAME POS FN . ARGS) from a sub-alist element (INDEX-NAME . SUB-ALIST). The check would make sense, if this function was applied to the cdr of an element, i.e. check if the argument is a SUB-ALIST. But this is not how this function is used in imenu.el . I might have initially (and falsely) determined this as the source of some bug. -ap P.S.: There is another dot missing in the documentation.