Mercurial > emacs
changeset 12703:d550939c05d1
(texinfo-imenu-generic-expression): Var defined.
(texinfo-mode): Set imenu-generic-expression.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 28 Jul 1995 00:24:14 +0000 |
parents | b0355a012c1d |
children | 0b36e50fb5af |
files | lisp/textmodes/texinfo.el |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/texinfo.el Fri Jul 28 00:18:42 1995 +0000 +++ b/lisp/textmodes/texinfo.el Fri Jul 28 00:24:14 1995 +0000 @@ -196,6 +196,15 @@ (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) +;; Written by Wolfgang Bangerth <zcg51122@rpool1.rus.uni-stuttgart.de> +;; 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 @@ (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)