1

Suppose we have a Spec_pages.pm file that looks like this:

package WWW::Spec_pages;

sub new
sub get_news
sub spec_page
sub spec_page_subtype

When I run M-x imenu, I get this:

*Rescan*
+Unsorted.List+...
+Packages+...
+Hierarchy+...
WWW::Spec_pages::new
WWW::Spec_pages::get_news
WWW::Spec_pages::spec_page
WWW::Spec_pages::spec_page_subtype

Is it possible to remove the unnecessary information and just keep the list of functions:

new
get_news
spec_page
spec_page_subtype

Maybe, it's also possible to sort them by name?

1 Answer 1

1

cperl-mode does not (yet) strip the package name from subroutines. I think this would be a good idea to add to cperl-mode, at least when there's only one package in the file. Do you want to report-emacs-bug?

As for sorting: cperl-mode honors the value of imenu-sort-function, which can be customized to sort alphabetically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.