[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Order in which hooks and defaults are applied, especially set-fill-c
Re: Order in which hooks and defaults are applied, especially set-fill-column.
Wed, 03 Dec 2003 22:17:08 GMT
On Wednesday 03 December 2003 20:15, Stefan Monnier wrote:
>> ;; AucTeX
> The default LaTeX editing mode in Emacs is `latex-mode' and runs
> `latex-mode-hook'. The mode offered by AUCTeX is called `LaTeX-mode'
> and runs `LaTeX-mode-hook'.
My ~/.emacs now includes the stuff below and I believe everything works
the way I want.
(add-to-list 'auto-mode-alist '("\\.tex\\'" . LaTeX-mode))
;; auto-fill for certain modes
(setq-default fill-column 70)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
(add-hook 'html-mode-hook 'turn-off-auto-fill)
(add-hook 'xml-mode-hook 'turn-off-auto-fill)
(add-hook 'LaTeX-mode-hook (lambda() (set-fill-column 100)))
Thank you very much for your help!