auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Setting file-local list variables


From: Mark Elston
Subject: Re: [AUCTeX] Setting file-local list variables
Date: Wed, 21 May 2008 13:53:12 -0700
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)



* Mark Elston wrote (on 5/20/2008 12:25 PM):
I have been trying to set a file local variable for a LaTeX file
I have been working on and it just doesn't seem to stick.  In
particular I am trying to set LaTeX-verbatim-environments.  I am
using the fancyvrb package and have developed some specific verbatim
environments and want AucTeX to deal with them appropriately.  These
environments are specific to the file I am working on and, so, I don't
want to customize AucTeX to *always* recognize them since they won't
appear in any other files.

However, when I put the following in my .tex file:

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% LaTeX-verbatim-environments: ("verbatim" "verbatim*" "CodeListing" "OldCodeListing" "NewCodeListing")
%%% End:

I get a warning when loading the file that setting the variable may
not be safe.  I hit 'y' to apply the local variables list and the file
is loaded.  However, even though I can look at the variable and see that
it is set appropriately, AucTeX doesn't handle these environments as
verbatim environments.

If I customize the variable then it works fine.

How do I set this variable so that it applies to the file?

Mark



OK.  I found the answer on my own, though I am not sure what to make
of it (thanks, google!).

Instead of setting the 'LaTeX-verbatim-environments' variable directly
I now have:

%%% eval: (eval-after-load "latex" '(progn
            (add-to-list 'LaTeX-verbatim-environments "CodeListing")
            (add-to-list 'LaTeX-verbatim-environments "OldCodeListing")
            (add-to-list 'LaTeX-verbatim-environments "NewCodeListing")
))


My question now is:  How do I know what variables have to be set
in this way rather than setting the values directly?  I could find
nothing in the manual that mentions this.

A related question is:  Why was this necesssary?  Why couldn't I
set the variable directly?

Mark




reply via email to

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