1 |
;;; imenu.el --- framework for mode-specific buffer indexes |
;;; imenu.el --- framework for mode-specific buffer indexes |
2 |
|
|
3 |
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc. |
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2003, 2004 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se> |
;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se> |
7 |
;; Lars Lindberg <lli@sypro.cap.se> |
;; Lars Lindberg <lli@sypro.cap.se> |
211 |
INDEX points to the substring in REGEXP that contains the name (of the |
INDEX points to the substring in REGEXP that contains the name (of the |
212 |
function, variable or type) that is to appear in the menu. |
function, variable or type) that is to appear in the menu. |
213 |
|
|
|
The variable is buffer-local. |
|
|
|
|
214 |
The variable `imenu-case-fold-search' determines whether or not the |
The variable `imenu-case-fold-search' determines whether or not the |
215 |
regexp matches are case sensitive, and `imenu-syntax-alist' can be |
regexp matches are case sensitive, and `imenu-syntax-alist' can be |
216 |
used to alter the syntax table for the search. |
used to alter the syntax table for the search. |
238 |
The function `imenu--subalist-p' tests an element and returns t |
The function `imenu--subalist-p' tests an element and returns t |
239 |
if it is a sub-alist. |
if it is a sub-alist. |
240 |
|
|
241 |
This function is called within a `save-excursion'. |
This function is called within a `save-excursion'.") |
|
|
|
|
The variable is buffer-local.") |
|
242 |
;;;###autoload |
;;;###autoload |
243 |
(make-variable-buffer-local 'imenu-create-index-function) |
(make-variable-buffer-local 'imenu-create-index-function) |
244 |
|
|
252 |
file. |
file. |
253 |
|
|
254 |
The function should leave point at the place to be connected to the |
The function should leave point at the place to be connected to the |
255 |
index and it should return nil when it doesn't find another index. |
index and it should return nil when it doesn't find another index.") |
|
|
|
|
This variable is local in all buffers.") |
|
256 |
;;;###autoload |
;;;###autoload |
257 |
(make-variable-buffer-local 'imenu-prev-index-position-function) |
(make-variable-buffer-local 'imenu-prev-index-position-function) |
258 |
|
|
262 |
|
|
263 |
This function is called after `imenu-prev-index-position-function' |
This function is called after `imenu-prev-index-position-function' |
264 |
finds a position for an index item, with point at that position. |
finds a position for an index item, with point at that position. |
265 |
It should return the name for that index item. |
It should return the name for that index item.") |
|
|
|
|
This variable is local in all buffers.") |
|
266 |
;;;###autoload |
;;;###autoload |
267 |
(make-variable-buffer-local 'imenu-extract-index-name-function) |
(make-variable-buffer-local 'imenu-extract-index-name-function) |
268 |
|
|
276 |
If nil, comparison is done with `string='. |
If nil, comparison is done with `string='. |
277 |
Set this to some other function for more advanced comparisons, |
Set this to some other function for more advanced comparisons, |
278 |
such as \"begins with\" or \"name matches and number of |
such as \"begins with\" or \"name matches and number of |
279 |
arguments match\". |
arguments match\".") |
|
|
|
|
This variable is local in all buffers.") |
|
280 |
;;;###autoload |
;;;###autoload |
281 |
(make-variable-buffer-local 'imenu-name-lookup-function) |
(make-variable-buffer-local 'imenu-name-lookup-function) |
282 |
|
|
444 |
"The buffer index computed for this buffer in Imenu. |
"The buffer index computed for this buffer in Imenu. |
445 |
Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). |
Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). |
446 |
Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). |
Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). |
447 |
A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). |
A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") |
|
|
|
|
This variable is local in all buffers, once set.") |
|
448 |
|
|
449 |
(make-variable-buffer-local 'imenu--index-alist) |
(make-variable-buffer-local 'imenu--index-alist) |
450 |
|
|
973 |
(defvar imenu-buffer-menubar nil) |
(defvar imenu-buffer-menubar nil) |
974 |
|
|
975 |
(defvar imenu-menubar-modified-tick 0 |
(defvar imenu-menubar-modified-tick 0 |
976 |
"The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'. |
"The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.") |
|
This value becomes local in every buffer when it is set.") |
|
977 |
(make-variable-buffer-local 'imenu-menubar-modified-tick) |
(make-variable-buffer-local 'imenu-menubar-modified-tick) |
978 |
|
|
979 |
(defun imenu-update-menubar () |
(defun imenu-update-menubar () |