[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/imenu.el
From: |
Daniel Pfeiffer |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/imenu.el |
Date: |
Fri, 20 May 2005 22:44:29 -0400 |
Index: emacs/lisp/imenu.el
diff -c emacs/lisp/imenu.el:1.110 emacs/lisp/imenu.el:1.111
*** emacs/lisp/imenu.el:1.110 Thu May 19 19:06:18 2005
--- emacs/lisp/imenu.el Sat May 21 02:44:29 2005
***************
*** 192,223 ****
(defvar imenu-generic-expression nil
"The regex pattern to use for creating a buffer index.
! If non-nil this pattern is passed to `imenu--generic-function'
! to create a buffer index.
!
! The value should be an alist with elements that look like this:
! (MENU-TITLE REGEXP INDEX)
! or like this:
! (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
! with zero or more ARGUMENTS. The former format creates a simple element in
! the index alist when it matches; the latter creates a special element
! of the form (NAME POSITION-MARKER FUNCTION ARGUMENTS...)
! with FUNCTION and ARGUMENTS copied from `imenu-generic-expression'.
!
! MENU-TITLE is a string used as the title for the submenu or nil if the
! entries are not nested.
!
! REGEXP is a regexp that should match a construct in the buffer that is
! to be displayed in the menu; i.e., function or variable definitions,
! etc. It contains a substring which is the name to appear in the
! menu. See the info section on Regexps for more information.
!
! INDEX points to the substring in REGEXP that contains the name (of the
! function, variable or type) that is to appear in the menu.
!
! The variable `imenu-case-fold-search' determines whether or not the
! regexp matches are case sensitive, and `imenu-syntax-alist' can be
! used to alter the syntax table for the search.
For example, see the value of `fortran-imenu-generic-expression' used by
`fortran-mode' with `imenu-syntax-alist' set locally to give the
--- 192,200 ----
(defvar imenu-generic-expression nil
"The regex pattern to use for creating a buffer index.
! If non-nil this pattern is passed to `imenu--generic-function' to
! create a buffer index. Look there for the documentation of this
! pattern's structure.
For example, see the value of `fortran-imenu-generic-expression' used by
`fortran-mode' with `imenu-syntax-alist' set locally to give the
***************
*** 750,770 ****
"Return an index of the current buffer as an alist.
PATTERNS is an alist with elements that look like this:
! (MENU-TITLE REGEXP INDEX).
or like this:
(MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
! with zero or more ARGUMENTS.
!
! MENU-TITLE is a string used as the title for the submenu or nil if the
! entries are not nested.
!
! REGEXP is a regexp that should match a construct in the buffer that is
! to be displayed in the menu; i.e., function or variable definitions,
! etc. It contains a substring which is the name to appear in the
! menu. See the info section on Regexps for more information.
! INDEX points to the substring in REGEXP that contains the name (of the
! function, variable or type) that is to appear in the menu.
See `lisp-imenu-generic-expression' for an example of PATTERNS.
--- 727,759 ----
"Return an index of the current buffer as an alist.
PATTERNS is an alist with elements that look like this:
! (MENU-TITLE REGEXP INDEX)
or like this:
(MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
! with zero or more ARGUMENTS. The former format creates a simple
! element in the index alist when it matches; the latter creates a
! special element of the form (NAME POSITION-MARKER FUNCTION
! ARGUMENTS...) with FUNCTION and ARGUMENTS copied from
! `imenu-generic-expression'.
!
! MENU-TITLE is a string used as the title for the submenu or nil
! if the entries are not nested.
!
! REGEXP is a regexp that should match a construct in the buffer
! that is to be displayed in the menu; i.e., function or variable
! definitions, etc. It contains a substring which is the name to
! appear in the menu. See the info section on Regexps for more
! information. REGEXP may also be a function, called without
! arguments. It is expected to search backwards. It shall return
! true and set `match-data' iff it finds another element.
!
! INDEX points to the substring in REGEXP that contains the
! name (of the function, variable or type) that is to appear in the
! menu.
! The variable `imenu-case-fold-search' determines whether or not the
! regexp matches are case sensitive, and `imenu-syntax-alist' can be
! used to alter the syntax table for the search.
See `lisp-imenu-generic-expression' for an example of PATTERNS.
***************
*** 811,817 ****
start beg)
;; Go backwards for convenience of adding items in order.
(goto-char (point-max))
! (while (and (re-search-backward regexp nil t)
;; Exit the loop if we get an empty match,
;; because it means a bad regexp was specified.
(not (= (match-beginning 0) (match-end 0))))
--- 800,808 ----
start beg)
;; Go backwards for convenience of adding items in order.
(goto-char (point-max))
! (while (and (if (functionp regexp)
! (funcall regexp)
! (re-search-backward regexp nil t))
;; Exit the loop if we get an empty match,
;; because it means a bad regexp was specified.
(not (= (match-beginning 0) (match-end 0))))