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: https://www.gnu.org/software/auctex/manual/auctex/Modes-and-Hooks.html – lawlist Jun 21 '16 at 19:08M-x describe-mode
, and it stated that both tex-mode-hook and latex-mode-hook are invoked however. – bernie Jun 21 '16 at 19:10tex-mode-hook
toLaTeX-mode-hook
made things work – bernie Jun 21 '16 at 19:12:override advice: \
TeX-latex-mode'in
describe-mode` – bernie Jun 21 '16 at 19:26(lambda () (show-paren-mode 1))
you can just write#'show-paren-mode
. – Stefan Jun 25 '16 at 23:08#'
means. Can I omit the #? – bernie Jun 28 '16 at 15:20