diff options
| author | Richard M. Stallman | 2001-06-29 17:53:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-06-29 17:53:41 +0000 |
| commit | 5e6f9132de4033488b3ba5c6b556fdaca675b38c (patch) | |
| tree | 483562c69bf9879e7b748848f2e202a731edb929 | |
| parent | 0c1baae862c3056082a3a21d9afeff704e80a4b6 (diff) | |
| download | emacs-5e6f9132de4033488b3ba5c6b556fdaca675b38c.tar.gz emacs-5e6f9132de4033488b3ba5c6b556fdaca675b38c.zip | |
Minor clarifications. Explain how to use imenu-sort-function.
Fix name of imenu-add-menubar-index.
| -rw-r--r-- | man/programs.texi | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/man/programs.texi b/man/programs.texi index ec9c7a70a0e..aef2932a1eb 100644 --- a/man/programs.texi +++ b/man/programs.texi | |||
| @@ -233,8 +233,9 @@ the same as @kbd{C-M-a} with a positive argument. | |||
| 233 | @findex c-mark-function | 233 | @findex c-mark-function |
| 234 | To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) | 234 | To operate on the current defun, use @kbd{C-M-h} (@code{mark-defun}) |
| 235 | which puts point at the beginning and mark at the end of the current | 235 | which puts point at the beginning and mark at the end of the current |
| 236 | or next defun. this is the easiest way to get ready to kill the defun | 236 | defun. This is the easiest way to get ready to kill the defun in |
| 237 | in order move it to a different place in the file. | 237 | order to move it to a different place in the file. If you use the |
| 238 | command while point is between defuns, it uses the following defun. | ||
| 238 | 239 | ||
| 239 | In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, | 240 | In C mode, @kbd{C-M-h} runs the function @code{c-mark-function}, |
| 240 | which is almost the same as @code{mark-defun}; the difference is that | 241 | which is almost the same as @code{mark-defun}; the difference is that |
| @@ -251,24 +252,25 @@ any or all of these key bindings for that purpose. | |||
| 251 | @cindex buffer content indexes | 252 | @cindex buffer content indexes |
| 252 | @cindex tags | 253 | @cindex tags |
| 253 | 254 | ||
| 254 | The Imenu facility offers a way to find the definitions in a file by | 255 | The Imenu facility offers a way to find the the major definitions in |
| 255 | name. It is also useful in text formatter major modes, where it | 256 | a file by name. It is also useful in text formatter major modes, |
| 256 | treats each chapter, section, etc., as a definition. (@pxref{Tags}, | 257 | where it treats each chapter, section, etc., as a definition. |
| 257 | for a more powerful feature that handles multiple files together.) | 258 | (@pxref{Tags}, for a more powerful feature that handles multiple files |
| 259 | together.) | ||
| 258 | 260 | ||
| 259 | @findex imenu | 261 | @findex imenu |
| 260 | @findex imenu-add-menu-bar-index | 262 | If you type @kbd{M-x imenu}, it reads the name of a definition using |
| 261 | If you type @kbd{M-x imenu}, it reads the name of a definition in | 263 | the minibuffer, then goes to that definition. You can use completion |
| 262 | the current buffer, then goes to that definition. You can use | 264 | to specify the name, and a complete list of possible names is always |
| 263 | completion to specify the name, and a complete list of possible names | 265 | displayed. |
| 264 | is always displayed. | ||
| 265 | 266 | ||
| 267 | @findex imenu-add-menubar-index | ||
| 266 | Alternatively, you can bind the command @code{imenu} to a mouse | 268 | Alternatively, you can bind the command @code{imenu} to a mouse |
| 267 | click. Then it displays mouse menus for you to select the definition | 269 | click. Then it displays mouse menus for you to select the definition |
| 268 | you want. You can also add the buffer's index to the menu bar by | 270 | you want. You can also add the buffer's index to the menu bar by |
| 269 | calling @code{imenu-add-menu-bar-index}. If you want to have this | 271 | calling @code{imenu-add-menubar-index}. If you want to have this |
| 270 | menu bar item available for all buffers in a certain major mode, you | 272 | menu bar item available for all buffers in a certain major mode, you |
| 271 | can do this by adding @code{imenu-add-menu-bar-index} to its mode | 273 | can do this by adding @code{imenu-add-menubar-index} to its mode |
| 272 | hook. But then you will have to wait for the buffer to be searched | 274 | hook. But then you will have to wait for the buffer to be searched |
| 273 | for definitions, each time you visit a file which uses that mode. | 275 | for definitions, each time you visit a file which uses that mode. |
| 274 | 276 | ||
| @@ -283,8 +285,9 @@ in the text. | |||
| 283 | @vindex imenu-sort-function | 285 | @vindex imenu-sort-function |
| 284 | You can customize the way the menus are sorted by setting the | 286 | You can customize the way the menus are sorted by setting the |
| 285 | variable @code{imenu-sort-function}. By default names are ordered as | 287 | variable @code{imenu-sort-function}. By default names are ordered as |
| 286 | they occur in the buffer; alphabetic sorting is provided as an | 288 | they occur in the buffer; if you want alphabetic sorting, use the |
| 287 | alternative. | 289 | symbol @code{imenu--sort-by-name} as the value. You can also |
| 290 | define your own comparison function by writing Lisp code. | ||
| 288 | 291 | ||
| 289 | Imenu provides the information to guide Which Function mode | 292 | Imenu provides the information to guide Which Function mode |
| 290 | @ifnottex | 293 | @ifnottex |