I was playing around with my .emacs, and I cannot figure out why the following does not work with .tex files:
(add-hook 'tex-mode-hook
(lambda ()
(show-paren-mode t)))
On the other hand, the following does work on elisp files.
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(show-paren-mode t)))
Actually, just having the elisp hook is sufficient to enable paren mode on .tex files. I'm not sure what's going on.
Running 24.5.1 on OS X with auctex installed.
tex-mode.el
and AUCTex which does not ship with Emacs. The hooks that AUCTex uses are similar looking, but are different -- here is a link t the manual describing common hooks used in AUCTex: gnu.org/software/auctex/manual/auctex/Modes-and-Hooks.htmlM-x describe-mode
, and it stated that both tex-mode-hook and latex-mode-hook are invoked however.tex-mode-hook
toLaTeX-mode-hook
made things work:override advice: `TeX-latex-mode'
indescribe-mode
(lambda () (show-paren-mode 1))
you can just write#'show-paren-mode
.