Mercurial > emacs
changeset 12704:0b36e50fb5af
(latex-imenu-generic-expression): Var defined.
(latex-mode): Set imenu-generic-expression.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 28 Jul 1995 00:26:37 +0000 |
parents | d550939c05d1 |
children | dca7533ebb9e |
files | lisp/textmodes/tex-mode.el |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el Fri Jul 28 00:24:14 1995 +0000 +++ b/lisp/textmodes/tex-mode.el Fri Jul 28 00:26:37 1995 +0000 @@ -178,6 +178,20 @@ (defvar tex-mode-syntax-table nil "Syntax table used while in TeX mode.") +;; Written by Wolfgang Bangerth <zcg51122@rpool1.rus.uni-stuttgart.de> +(defvar latex-imenu-generic-expression + '( + ("Part" "\\\\part{\\([^}]*\\)}" 1) + ("Chapter" "\\\\chapter{\\([^}]*\\)}" 1) + ("Section" "\\\\[a-zA-Z]*section{\\([^}]*\\)}" 1) + ;; i put numbers like 3.15 before my + ;; \begin{equation}'s which tell me + ;; the number the equation will get when + ;; being printed. + ("Equations" "%[ \t]*\\([0-9]+\\.[0-9]+\\)[,;]?[ \t]?" 1)) + + "Imenu generic expression for LaTex mode. See `imenu-generic-expression'.") + (defun tex-define-common-keys (keymap) "Define the keys that we want defined both in TeX mode and in the TeX shell." (define-key keymap "\C-c\C-k" 'tex-kill-job) @@ -401,6 +415,8 @@ \\\\[a-z]*space\\|\\\\[a-z]*skip\\|\ \\\\newpage\\|\\\\[a-z]*page[a-z]*\\|\\\\footnote\\|\ \\\\marginpar\\|\\\\parbox\\|\\\\caption\\)[ \t]*\\($\\|%\\)") + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression latex-imenu-generic-expression) (run-hooks 'text-mode-hook 'tex-mode-hook 'latex-mode-hook)) ;;;###autoload