[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: How to get pdf mode turned on automatically for beamer file
[AUCTeX] Re: How to get pdf mode turned on automatically for beamer files
Sat, 26 Nov 2005 23:05:37 +0100
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)
* Sebastian Luque (2005-11-26) writes:
> Ralf Angeli <address@hidden> wrote:
>> (eval-after-load "tex"
>> '(TeX-add-style-hook "beamer" (lambda () (TeX-PDF-mode 1))))
> Is there any reason this would keep beamer.el from loading?
> In a fresh
> session, opening a beamer file does show pdf mode turned on, but all macro
> auto-completion is missing. Manually loading beamer.el fixes the problem.
> Macro auto-completion and other beamer.el functionality is available
> without adding the above hook.
Okay, the beloved style system does not let me debug it. The
condition for not loading the style file is probably the `unless'
statement in `TeX-run-style-hooks' but I cannot prove that with a
Not so nice as the original form above but working better is this:
(when (member "beamer" TeX-active-styles)
(TeX-add-style-hook "beamer" (lambda () (TeX-PDF-mode 1))))))
In order to make this more userfriendly we could let `TeX-load-style'
run a hook (with the style name as argument).