[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: TeX-add-style-hook and beamer
From: |
Ralf Angeli |
Subject: |
[AUCTeX] Re: TeX-add-style-hook and beamer |
Date: |
Fri, 13 Oct 2006 00:50:26 +0200 |
* Leo (2006-10-12) writes:
> On Thu, 12/10/06 09:20 +0100, Reiner Steib wrote:
>
>> On Thu, Oct 12 2006, Leo wrote:
>>
>>> With the following lines in my .emacs, auctex can't detect beamer
>>> style correctly i.e. \frametitle{} is not fontified and "C-x C-e" has
>>> no `frame' option. I suspect this a bug.
Then why didn't you use `M-x TeX-submit-bug-report RET'?
>>> ,----
>>> | (eval-after-load "tex" '(TeX-add-style-hook "beamer"
>>> | (lambda () (TeX-PDF-mode 1))))
>>> `----
>>
>> IIRC, this is wrong. I use...
>>
>> (eval-after-load "tex"
>> ;; http://thread.gmane.org/gmane.emacs.auctex.general/718
>> '(add-hook 'LaTeX-mode-hook
>> (lambda ()
>> (when (member "beamer" TeX-active-styles)
>> (TeX-add-style-hook "beamer" (lambda () (TeX-PDF-mode 1)))))))
>>
>> ... as suggested in
>> <http://thread.gmane.org/gmane.emacs.auctex.general/718>.
Is there a reason for wrapping this in `eval-after-load'? The code
should work equally well without it.
> This works partially. Start a new emacs and open a beamer file, it
> will not enter PDF mode initially, but any subsequent opening will.
It's working fine in my case (current CVS AUCTeX, current CVS Emacs
from trunk).
--
Ralf