[Top][All Lists]

[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: Sun, 25 May 2008 11:02:01 -0700
User-agent: Thunderbird (Windows/20080421)


* Ralf Angeli wrote (on 5/25/2008 10:01 AM):
* Mark Elston (2008-05-25) writes:

%%% eval: (eval-after-load "latex" '(progn
                   (add-to-list 'LaTeX-verbatim-environments-local
                   (add-to-list 'LaTeX-verbatim-environments-local
                   (add-to-list 'LaTeX-verbatim-environments-local
%%% eval: (funcall 'font-latex-setup)

This sets up the buffer-local variable LaTeX-verbatim-environments-local
and forces font locking to take these new settings into account.

The `eval-after-load' call is unnecessary.  You can directly add values
to the variable.  And I recalled that you don't need to call
`font-latex-setup'.  Calling `font-latex-set-syntactic-keywords' should
suffice.  So you could use something like

%%% eval: (progn (dolist (elt '("CodeListing" "OldCodeListing" "NewCodeListing"))
>              (add-to-list 'LaTeX-verbatim-environments-local elt))
>            (font-latex-set-syntactic-keywords))

Even better!  Thanks.

I wasn't aware of the 'font-latex-set-syntactic-keywords' function.
Works like a charm!


reply via email to

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