From: Karl Heuer Date: Fri, 28 Jul 1995 00:24:14 +0000 (+0000) Subject: (texinfo-imenu-generic-expression): Var defined. X-Git-Tag: emacs-19.34~3157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4cfb70d5cd2eddec3c8c9b6ee49bc3485ff8e66;p=emacs.git (texinfo-imenu-generic-expression): Var defined. (texinfo-mode): Set imenu-generic-expression. --- diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 608c739c346..b72b378b6fc 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -196,6 +196,15 @@ chapter." (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) +;; Written by Wolfgang Bangerth +;; To overide this example, set either `imenu-generic-expression' +;; or `imenu-create-index-function'. +(defvar texinfo-imenu-generic-expression + '((nil "^@node[ \t]+\\([^,\n]*\\)" 1) + ("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1)) + + "Imenu generic expression for TexInfo mode. See `imenu-generic-expression'.") + (defvar texinfo-font-lock-keywords (list '("^\\(@c\\|@comment\\)[ \t].*" . font-lock-comment-face) ;comments @@ -384,6 +393,8 @@ value of texinfo-mode-hook." (setq comment-start-skip "@c +") (make-local-variable 'words-include-escapes) (setq words-include-escapes t) + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression texinfo-imenu-generic-expression) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(texinfo-font-lock-keywords)) (make-local-variable 'tex-start-of-header)