mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(latex-imenu-generic-expression): Var defined.
(latex-mode): Set imenu-generic-expression.
This commit is contained in:
parent
e4cfb70d5c
commit
0fb4f2457b
1 changed files with 16 additions and 0 deletions
|
|
@ -178,6 +178,20 @@ Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].")
|
|||
(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 @@ subshell is initiated, `tex-shell-hook' is run."
|
|||
\\\\[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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue