* Sebastian Luque (2005-11-26) writes:

> Ralf Angeli <[EMAIL PROTECTED]> 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?

Obviously.

> 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
debugger.

Not so nice as the original form above but working better is this:

(add-hook 'LaTeX-mode-hook
          (lambda ()
            (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).

-- 
Ralf



_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex

Reply via email to