Function: LaTeX-mode-cleanup
LaTeX-mode-cleanup is a byte-compiled function defined in latex.el.
Signature
(LaTeX-mode-cleanup)
Documentation
Cleanup function for LaTeX-mode.
Run after mode hooks and file local variables application.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/latex.el
(defun LaTeX-mode-cleanup ()
"Cleanup function for `LaTeX-mode'.
Run after mode hooks and file local variables application."
;; Defeat filladapt
(if (bound-and-true-p filladapt-mode)
(turn-off-filladapt-mode))
;; Keep `LaTeX-paragraph-commands-regexp' in sync with
;; `LaTeX-paragraph-commands' in case the latter is updated by
;; hooks or file (directory) local variables.
(and (local-variable-p 'LaTeX-paragraph-commands)
(setq-local LaTeX-paragraph-commands-regexp
(LaTeX-paragraph-commands-regexp-make)))
;; Don't do locally-bound test for `paragraph-start' because it
;; makes little sense; Style files casually call this function and
;; overwrite it unconditionally. Users who need per-file
;; customization of `paragraph-start' should set
;; `LaTeX-paragraph-commands' instead.
(LaTeX-set-paragraph-start)
;; Don't do locally-bound test for similar reason as above. Users
;; who need per-file customization of
;; `LaTeX-indent-begin-regexp-local' etc. should set
;; `LaTeX-indent-begin-list' and so on instead.
(LaTeX-indent-commands-regexp-make)
(setq TeX-complete-list
(append '(("\\\\cite\\[[^]\n\r\\%]*\\]{\\([^{}\n\r\\%,]*\\)"
1 LaTeX-bibitem-list "}")
("\\\\cite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
("\\\\cite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
2 LaTeX-bibitem-list)
("\\\\nocite{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-bibitem-list "}")
("\\\\nocite{\\([^{}\n\r\\%]*,\\)\\([^{}\n\r\\%,]*\\)"
2 LaTeX-bibitem-list)
("\\\\[Rr]ef{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-completion-label-list "}")
("\\\\eqref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-completion-label-list "}")
("\\\\pageref{\\([^{}\n\r\\%,]*\\)" 1 LaTeX-completion-label-list "}")
("\\\\\\(index\\|glossary\\){\\([^{}\n\r\\%]*\\)"
2 LaTeX-index-entry-list "}")
("\\\\begin{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}")
("\\\\end{\\([A-Za-z]*\\)" 1 LaTeX-environment-list-filtered "}")
("\\\\renewcommand\\*?{\\\\\\([A-Za-z]*\\)"
1 TeX-symbol-list-filtered "}")
("\\\\renewenvironment\\*?{\\([A-Za-z]*\\)"
1 LaTeX-environment-list-filtered "}")
("\\\\\\(this\\)?pagestyle{\\([A-Za-z]*\\)"
2 LaTeX-pagestyle-list "}")
(LaTeX--after-math-macro-prefix-p
1 (lambda ()
(seq-filter #'stringp
(append (mapcar #'cadr LaTeX-math-list)
(mapcar #'cadr LaTeX-math-default))))
(if TeX-insert-braces "{}")))
TeX-complete-list)))