Mercurial > emacs
comparison lisp/imenu.el @ 20857:185fa242a2ea
(imenu-generic-expression): Doc fix.
(imenu--index-alist): Doc fix.
(imenu-create-index-function): Doc fix.
(imenu-prev-index-position-function): Doc fix.
(imenu-extract-index-name-function): Doc fix.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 06 Feb 1998 21:55:42 +0000 |
parents | 31a8ad177c4c |
children | 5898cd2e4cd6 |
comparison
equal
deleted
inserted
replaced
20856:1e37bbef998c | 20857:185fa242a2ea |
---|---|
164 (MENU-TITLE REGEXP INDEX) | 164 (MENU-TITLE REGEXP INDEX) |
165 or like this: | 165 or like this: |
166 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) | 166 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) |
167 with zero or more ARGUMENTS. The former format creates a simple element in | 167 with zero or more ARGUMENTS. The former format creates a simple element in |
168 the index alist when it matches; the latter creates a special element | 168 the index alist when it matches; the latter creates a special element |
169 of the form (NAME FUNCTION NAME POSITION-MARKER ARGUMENTS...) | 169 of the form (NAME FUNCTION POSITION-MARKER ARGUMENTS...) |
170 with FUNCTION and ARGUMENTS beiong copied from `imenu-generic-expression'. | 170 with FUNCTION and ARGUMENTS beiong copied from `imenu-generic-expression'. |
171 | 171 |
172 MENU-TITLE is a string used as the title for the submenu or nil if the | 172 MENU-TITLE is a string used as the title for the submenu or nil if the |
173 entries are not nested. | 173 entries are not nested. |
174 | 174 |
201 | 201 |
202 It should be a function that takes no arguments and returns an index | 202 It should be a function that takes no arguments and returns an index |
203 of the current buffer as an alist. | 203 of the current buffer as an alist. |
204 | 204 |
205 Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). | 205 Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). |
206 Special elements look like (INDEX-NAME FUNCTION ARGUMENTS...). | 206 Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). |
207 A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). | 207 A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). |
208 The function `imenu--subalist-p' tests an element and returns t | 208 The function `imenu--subalist-p' tests an element and returns t |
209 if it is a sub-alist. | 209 if it is a sub-alist. |
210 | 210 |
211 This function is called within a `save-excursion'. | 211 This function is called within a `save-excursion'. |
220 `imenu-default-create-index-function', then you must set this variable | 220 `imenu-default-create-index-function', then you must set this variable |
221 to a function that will find the next index, looking backwards in the | 221 to a function that will find the next index, looking backwards in the |
222 file. | 222 file. |
223 | 223 |
224 The function should leave point at the place to be connected to the | 224 The function should leave point at the place to be connected to the |
225 index and it should return nil when it doesn't find another index.") | 225 index and it should return nil when it doesn't find another index. |
226 | |
227 This variable is local in all buffers.") | |
228 | |
226 (make-variable-buffer-local 'imenu-prev-index-position-function) | 229 (make-variable-buffer-local 'imenu-prev-index-position-function) |
227 | 230 |
228 (defvar imenu-extract-index-name-function nil | 231 (defvar imenu-extract-index-name-function nil |
229 "Function for extracting the index name. | 232 "Function for extracting the index item nam, given a position. |
230 | 233 |
231 This function is called after the function pointed out by | 234 This function is called after `imenu-prev-index-position-function' |
232 `imenu-prev-index-position-function'.") | 235 finds a position for an index item, with point at that position. |
236 It should return the name for that index item. | |
237 | |
238 This variable is local in all buffers.") | |
239 | |
233 (make-variable-buffer-local 'imenu-extract-index-name-function) | 240 (make-variable-buffer-local 'imenu-extract-index-name-function) |
234 | 241 |
235 (defvar imenu-default-goto-function 'imenu-default-goto-function | 242 (defvar imenu-default-goto-function 'imenu-default-goto-function |
236 "The default function called when selecting an Imenu item. | 243 "The default function called when selecting an Imenu item. |
237 The function in this variable is called when selecting a normal index-item.") | 244 The function in this variable is called when selecting a normal index-item.") |
389 ;; The item to use in the index for rescanning the buffer. | 396 ;; The item to use in the index for rescanning the buffer. |
390 (defconst imenu--rescan-item '("*Rescan*" . -99)) | 397 (defconst imenu--rescan-item '("*Rescan*" . -99)) |
391 | 398 |
392 ;; The latest buffer index. | 399 ;; The latest buffer index. |
393 ;; Buffer local. | 400 ;; Buffer local. |
394 (defvar imenu--index-alist nil) | 401 (defvar imenu--index-alist nil |
402 "The buffer index computed for this buffer in Imenu. | |
403 Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). | |
404 Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). | |
405 A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). | |
406 | |
407 This variable is local in all buffers, once set.") | |
408 | |
395 (make-variable-buffer-local 'imenu--index-alist) | 409 (make-variable-buffer-local 'imenu--index-alist) |
396 | 410 |
397 ;; The latest buffer index used to update the menu bar menu. | 411 ;; The latest buffer index used to update the menu bar menu. |
398 (defvar imenu--last-menubar-index-alist nil) | 412 (defvar imenu--last-menubar-index-alist nil) |
399 (make-variable-buffer-local 'imenu--last-menubar-index-alist) | 413 (make-variable-buffer-local 'imenu--last-menubar-index-alist) |