diff options
| author | Karl Heuer | 1995-07-28 00:24:14 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-07-28 00:24:14 +0000 |
| commit | e4cfb70d5cd2eddec3c8c9b6ee49bc3485ff8e66 (patch) | |
| tree | a4c640e56e0a624667fc8a5a14f2541c324e3ff5 /lisp/textmodes | |
| parent | 74480345ab76d05cf117ec0a29c3ae29c1bc4f23 (diff) | |
| download | emacs-e4cfb70d5cd2eddec3c8c9b6ee49bc3485ff8e66.tar.gz emacs-e4cfb70d5cd2eddec3c8c9b6ee49bc3485ff8e66.zip | |
(texinfo-imenu-generic-expression): Var defined.
(texinfo-mode): Set imenu-generic-expression.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/texinfo.el | 11 |
1 files changed, 11 insertions, 0 deletions
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." | |||
| 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 | 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'.") | ||
| 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 |
| @@ -384,6 +393,8 @@ value of texinfo-mode-hook." | |||
| 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) |