auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Re: How to get pdf mode turned on automatically for beamer


From: Ralf Angeli
Subject: Re: [AUCTeX] Re: How to get pdf mode turned on automatically for beamer files
Date: Sun, 30 Nov 2008 21:35:14 +0100

* Leo (2008-11-29) writes:

> On 2005-11-26 22:05 +0000, Ralf Angeli wrote:
>> (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).
>
> Any idea why this stops working with latest CVS?

Not really.  It looks like a change in Emacs led to this because it
still sort of works in Emacs 22.  I say "sort of" because of the
problems Reiner mentioned in this thread.

I changed the code in AUCTeX now in a way which ensures that the style
information is available when the mode hooks are run.  So if you use

(add-hook 'LaTeX-mode-hook
          (lambda ()
            (when (member "beamer" TeX-active-styles)
              (TeX-PDF-mode 1))))

instead of the code quoted above it should work.  However, even though
everything seemed to work when testing, the change I made may have side
effects and cause other problems, so please be on the lookout for bugs
related to the style system, like missing macro completion or
fontification.

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]