Please keep the mailing list copied when replying. * jlr 0 (2006-01-04) writes:
>>>>>> On Tue, 03 Jan 2006, at 10:56:15 , Ralf Angeli <[EMAIL PROTECTED]> wrote: > > >> | (add-hook 'plain-tex-mode-hook > >> | 'latex-mode) > > RA> You want LaTeX mode even for plain TeX files? That's a strange wish. > > Since I sometime use the .tex suffix for latex file, what I actually want is > that all my .tex files open in TeX-PDF mode. The code snippet above is not related to TeX-PDF mode. It forces AUCTeX into LaTeX mode even if a file was recognized as a plain TeX file. You also seem to have the impression that .ltx is the common extension for LaTeX files. It is not. The extension .tex is commonly used for them. And AUCTeX opens these files per default in LaTeX mode if their content does not indicate otherwise. See `C-h v TeX-default-mode RET'. Regarding TeX-PDF mode I already told you that this is a minor mode. So you usually want your LaTeX files to be opened with LaTeX mode as major mode and in addition TeX-PDF mode being activated. > RA> TeX-PDF-mode is a minor mode and you can set its default value > RA> e.g. with `M-x customize-variable RET TeX-PDF-mode RET'. In contrast, > RA> the "mode:" entry in the local variables section AUCTeX inserts is > RA> concerned with the major mode. > > Ok. > > Would the following work as well? > > ,---- > | %%% Local Variables: > | %%% minor-mode: TeX-PDF > | %%% End: > `---- No, there is no such thing as a "minor-mode:" entry for the local variables section. Minor modes can be toggled with a "mode:" entry just like major modes can. > or the following ? > > ,---- > | %%% Local Variables: > | %%% TeX-PDF: t > | %%% End: > `---- It would need to be "TeX-PDF-mode: t". This will set the mode _variable_ to t. But it is not guaranteed that this will activate the mode correctly. AUCTeX includes some adaptions to make this work but those are a bit controversial and I am not sure if they will stay forever. As long as Emacs does not provide a way to explicitely activate (in contrast to toggling) a mode they are likely to stay however. I still don't know why you need the TeX-PDF stuff in the local variables section. You are activating the mode yourself via a hook (and I told you another way to use TeX-PDF mode per default by customizing the variable `TeX-PDF-mode'). You already have what you want. -- Ralf _______________________________________________ auctex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex
