[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: TeX-add-style-hook and beamer
From: |
Reiner Steib |
Subject: |
[AUCTeX] Re: TeX-add-style-hook and beamer |
Date: |
Fri, 13 Oct 2006 10:30:13 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
On Fri, Oct 13 2006, Ralf Angeli wrote:
> * Leo (2006-10-12) writes:
> Is there a reason for wrapping this in `eval-after-load'? The code
> should work equally well without it.
Hm, yes.
>> 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).
I can reproduce Leo's description. Save the following to
/tmp/beam-test.el and start "emacs -Q -l /tmp/beam-test.el":
--8<---------------cut here---------------start------------->8---
(setq rs-ex-1 "/usr/share/texmf/doc/latex/beamer/examples/beamerexample1.tex")
(load "auctex")
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook
(lambda ()
(when (member "beamer" TeX-active-styles)
(TeX-add-style-hook "beamer" (lambda () (TeX-PDF-mode 1))))))
(find-file rs-ex-1)
(message "beamer active? %s"
(if (member "beamer" TeX-active-styles) t nil))
(sit-for 5)
(find-alternate-file rs-ex-1)
--8<---------------cut here---------------end--------------->8---
First, the tool bar shows the tex.xpm and viewdvi.xpm icons. After
`find-alternate-file', I see pdftex.xpm and viewpdf.xpm.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/