X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d8fb8cce84b923a3289b69549e30958710ac3ebb..0877d0dc24ee792b9b14592869ea1aa0934aee58:/lisp/imenu.el diff --git a/lisp/imenu.el b/lisp/imenu.el index 80dacf937d..0bfee77009 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -546,9 +546,7 @@ The returned alist DOES NOT share structure with MENULIST." Return a split and sorted copy of ALIST. The returned alist DOES NOT share structure with ALIST." (mapcar (lambda (elt) - (if (and (consp elt) - (stringp (car elt)) - (listp (cdr elt))) + (if (imenu--subalist-p elt) (imenu--split-menu (cdr elt) (car elt)) elt)) alist))