Hello users of Imenu.
I am using imenu to keep modules I write portable between XEmacs and
GNU Emacs although I am not using GNU Emacs. Someone may still
benefit from it.
The problem:
Using `imenu-generic-expression' to generate the menu
(make-local-variable 'imenu-generic-expression)
(setq imenu-generic-expression
(list
(list nil vb-function-definition-regexp 4)
(list "goto LABEL" vb-label-goto-regexp 2)
(list "LABEL:" vb-label-definition-regexp 1)
(list "Constants" vb-constant-regexp 3)
(list "Functions" vb-function-definition-regexp 4)
(list "Properties" vb-property-definition-regexp 3)
(list "Variables" vb-variable-regexp 3)))
(imenu-add-to-menubar "Symbols"))
I found menu splitting only to work on the top-level.
While I would like to use a sub-menu for functions:
(list "Functions" vb-function-definition-regexp 4)
this menu does not split and I can only access those functions from
the menu that fit on the screen.
The top-level entry
(list nil vb-function-definition-regexp 4)
which I put in for testing purposes splits nicely according to
imenu-max-items (25 by default), producing menu entries like:
From: a>
From: f>
From: m>
From: w>
goto LABEL:>
LABEL:>
Constants>
Functions>
Properties>
Variables>
Can anyone tell me how to get entries under
Functions>
to split out as
From: a>
From: f>
From: m>
From: w>
according to imenu-max-items?
Thanks for any suggestions!
Regards,
Adrian
Show replies by date