comparison lisp/textmodes/texinfo.el @ 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 c56f1c77ce73
children da8a788528dd
comparison
equal deleted inserted replaced
12702:b0355a012c1d 12703:d550939c05d1
193 (modify-syntax-entry ?\[ "(]" texinfo-mode-syntax-table) 193 (modify-syntax-entry ?\[ "(]" texinfo-mode-syntax-table)
194 (modify-syntax-entry ?\] ")[" texinfo-mode-syntax-table) 194 (modify-syntax-entry ?\] ")[" texinfo-mode-syntax-table)
195 (modify-syntax-entry ?{ "(}" texinfo-mode-syntax-table) 195 (modify-syntax-entry ?{ "(}" texinfo-mode-syntax-table)
196 (modify-syntax-entry ?} "){" texinfo-mode-syntax-table) 196 (modify-syntax-entry ?} "){" texinfo-mode-syntax-table)
197 (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table)) 197 (modify-syntax-entry ?\' "w" texinfo-mode-syntax-table))
198
199 ;; Written by Wolfgang Bangerth <zcg51122@rpool1.rus.uni-stuttgart.de>
200 ;; To overide this example, set either `imenu-generic-expression'
201 ;; or `imenu-create-index-function'.
202 (defvar texinfo-imenu-generic-expression
203 '((nil "^@node[ \t]+\\([^,\n]*\\)" 1)
204 ("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1))
205
206 "Imenu generic expression for TexInfo mode. See `imenu-generic-expression'.")
198 207
199 (defvar texinfo-font-lock-keywords 208 (defvar texinfo-font-lock-keywords
200 (list 209 (list
201 '("^\\(@c\\|@comment\\)[ \t].*" . font-lock-comment-face) ;comments 210 '("^\\(@c\\|@comment\\)[ \t].*" . font-lock-comment-face) ;comments
202 "@\\(@\\|[^}\t \n{]+\\)" ;commands 211 "@\\(@\\|[^}\t \n{]+\\)" ;commands
382 (setq comment-start "@c ") 391 (setq comment-start "@c ")
383 (make-local-variable 'comment-start-skip) 392 (make-local-variable 'comment-start-skip)
384 (setq comment-start-skip "@c +") 393 (setq comment-start-skip "@c +")
385 (make-local-variable 'words-include-escapes) 394 (make-local-variable 'words-include-escapes)
386 (setq words-include-escapes t) 395 (setq words-include-escapes t)
396 (make-local-variable 'imenu-generic-expression)
397 (setq imenu-generic-expression texinfo-imenu-generic-expression)
387 (make-local-variable 'font-lock-defaults) 398 (make-local-variable 'font-lock-defaults)
388 (setq font-lock-defaults '(texinfo-font-lock-keywords)) 399 (setq font-lock-defaults '(texinfo-font-lock-keywords))
389 (make-local-variable 'tex-start-of-header) 400 (make-local-variable 'tex-start-of-header)
390 (setq tex-start-of-header "%**start") 401 (setq tex-start-of-header "%**start")
391 (make-local-variable 'tex-end-of-header) 402 (make-local-variable 'tex-end-of-header)