comparison lisp/imenu.el @ 89909:68c22ea6027c

Sync to HEAD
author Kenichi Handa <handa@m17n.org>
date Fri, 16 Apr 2004 12:51:06 +0000
parents 375f2633d815
children 4c90ffeb71c5
comparison
equal deleted inserted replaced
89908:ee1402f7b568 89909:68c22ea6027c
749 (defun imenu--generic-function (patterns) 749 (defun imenu--generic-function (patterns)
750 "Return an index of the current buffer as an alist. 750 "Return an index of the current buffer as an alist.
751 751
752 PATTERNS is an alist with elements that look like this: 752 PATTERNS is an alist with elements that look like this:
753 (MENU-TITLE REGEXP INDEX). 753 (MENU-TITLE REGEXP INDEX).
754 or like this:
755 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
756 with zero or more ARGUMENTS.
754 757
755 MENU-TITLE is a string used as the title for the submenu or nil if the 758 MENU-TITLE is a string used as the title for the submenu or nil if the
756 entries are not nested. 759 entries are not nested.
757 760
758 REGEXP is a regexp that should match a construct in the buffer that is 761 REGEXP is a regexp that should match a construct in the buffer that is
764 function, variable or type) that is to appear in the menu. 767 function, variable or type) that is to appear in the menu.
765 768
766 See `lisp-imenu-generic-expression' for an example of PATTERNS. 769 See `lisp-imenu-generic-expression' for an example of PATTERNS.
767 770
768 Returns an index of the current buffer as an alist. The elements in 771 Returns an index of the current buffer as an alist. The elements in
769 the alist look like: (INDEX-NAME . INDEX-POSITION). They may also be 772 the alist look like:
770 nested index lists like (INDEX-NAME . INDEX-ALIST) depending on 773 (INDEX-NAME . INDEX-POSITION)
771 PATTERNS." 774 or like:
775 (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...)
776 They may also be nested index alists like:
777 (INDEX-NAME . INDEX-ALIST)
778 depending on PATTERNS."
772 779
773 (let ((index-alist (list 'dummy)) 780 (let ((index-alist (list 'dummy))
774 prev-pos beg 781 prev-pos beg
775 (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) 782 (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search)
776 (not (local-variable-p 'font-lock-defaults))) 783 (not (local-variable-p 'font-lock-defaults)))
1053 "^The mode `.*' does not support Imenu$")) 1060 "^The mode `.*' does not support Imenu$"))
1054 (add-to-list 'debug-ignored-errors mess)) 1061 (add-to-list 'debug-ignored-errors mess))
1055 1062
1056 (provide 'imenu) 1063 (provide 'imenu)
1057 1064
1065 ;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7
1058 ;;; imenu.el ends here 1066 ;;; imenu.el ends here