#18 Nested Imenu for PHP (on 1.4)

closed-out-of-date
nobody
None
5
2008-10-21
2008-07-26
Marcel Cary
No

Here's the patch against 1.4. I adapted the instructions a little, for example, to refer to php-mode-hook instead of php-mode-user-hook. I also added the "final" keyword to the function regexp. But for the most part, it's the same patch with different context so it applies cleanly.

I only have emacs21 installed, so that's all I tested against. I'd love to hear from someone with emacs22 about whether it works there, too.

I didn't see how to upload an additional patch to #2027841, so I've opened this new one instead.

From 2027841:

This patch organizes the imenu by PHP class. Functions appear in the imenu (or speedbar) under the class in which they are defined, not under an unwieldy list of all functions.

With the improved organization, the PHP mode imenu becomes much more useful for conveying a code overview.

http://www.oak.homeunix.org/~marcel/blog/articles/2008/07/18/nested-imenu-for-php

Discussion

    • status: open --> closed-out-of-date
     
  • This is a great idea. I wish it was easier to accomplish -- easier to parse classes with CC mode's help, and easier to provide to Imenu. There are other bugs fixed related to Imenu in the next release. Perhaps we can take this feature request up down the road.