Next: , Previous: PHP Documentation, Up: Top


9 Index Menu

PHP mode provides a menu of the functions and classes defined in the current buffer. The menu is pretty simple, but is helpful when navigating large files. The contents of the menu also provide a good overview to the user about the file's contents.

To enable this menu, run the following command.

M-x imenu-add-menubar-index
Scan the file for functions and class declarations, then add a menu item called “Index” to the menu bar.

In the menu are any one or more of the following menu items.

`Functions'
A sub-menu containing the names of functions defined in the current buffer. Clicking on a function name will visit the location of the function's definition.
`Classes'
A sub-menu containing the names of classes defined in the current buffer. Clicking on a class name will visit the location of the class's definition.
`*Rescan*'
Rescan the contents of the current buffer, and update both the indexes the entries in the menu.

To have Emacs automatically rescan the current buffer, change the setting for imenu-auto-rescan to non-nil with either M-x customize-variable RET php-completion-file RET, or by setting the value in your Emacs initialization file (~/.emacs).