* Ralf Angeli (2008-12-01) writes:

> I reverted the change because it did not work correctly.  It seems to
> work if the style information is updated right before the mode hooks are
> called but I need to check this more thoroughly.

In general the problem is that when a style is to be loaded by
`TeX-load-style', the variable `TeX-style-hook-list' is checked for the
presence of the style.  So if `TeX-add-style-hook' is executed before
`TeX-load-style' is called the first time, the style is present and none
of the files for the style will be loaded.

One could circumvent this, for example, by using a separate variable for
tracking which styles have been loaded, but I am a bit reluctant to add
this because it's yet another variable to keep track of.

So for a user the right thing to do would be to prepare a style file
with the following contents and put it into a directory which is listed
in `TeX-style-private':

(TeX-add-style-hook
 "beamer"
 (lambda ()
   (TeX-PDF-mode 1)))

One could argue that this is the canonical way to add a style hook in
AUCTeX (in contrast to putting the call in the init file).

-- 
Ralf



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

Reply via email to