Search code examples
emacselisp

Emacs Elisp Overriding Default Value


I have several abbrev defined that I was accessible everywhere except in latex mode. I defined

(setq-default abbrev-mode t)
(add-hook 'latex-mode-hook (lambda () (abbrev-mode -1)))

But whenever I open a latex file it still has abbrev mode enabled. What's going on?


Solution

  • The reason was that AUCTex uses LaTeX-mode-hook. Thanks to stefan in the comment for pointing that out