[Top][All Lists]

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

Re: [AUCTeX] emaxima environments ($, language-specific indentation)

From: Tamas Papp
Subject: Re: [AUCTeX] emaxima environments ($, language-specific indentation)
Date: Wed, 12 Mar 2014 14:16:38 +0100
User-agent: mu4e; emacs 24.3.1

On Wed, Mar 12 2014, Tassilo Horn <address@hidden> wrote:

> Tamas Papp <address@hidden> writes:
>>> I guess the reason is that the value is already needed when
>>> initializing font-lock.  And the setting of `font-lock-set-defaults'
>>> and calling `font-latex-set-syntactic-keywords' is also important.
>> Thanks, this works fine. Out of curiosity, is there a way to
>> re-initialize font-lock with a mode hook? I can of course copy-paste
>> the Local variables section to each file I work with, but a more
>> automated solution would be nice, too.
> This seems to work for me:
> --8<---------------cut here---------------start------------->8---
> (defun th/LaTeX-maxima-support ()
>   (setq LaTeX-verbatim-environments-local '("maxima" "maxima*"))
>   (setq font-lock-set-defaults nil)
>   (font-latex-set-syntactic-keywords))
> (add-hook 'LaTeX-mode-hook #'th/LaTeX-maxima-support)
> --8<---------------cut here---------------end--------------->8---
> Then I can omit the local variables.

Yes, this does work nicely --- thanks!



reply via email to

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