[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Italicizing user macros
From: |
Ivan Andrus |
Subject: |
Re: [AUCTeX] Italicizing user macros |
Date: |
Wed, 27 Jul 2016 08:16:49 -0600 |
On Wed, Jul 27, 2016 at 6:51 AM, Arash Esbati <address@hidden> wrote:
> Ognjen Maric <address@hidden> writes:
>
>> I'd like AUCTeX to render a particular macro I define (called inldef) the
>> same way that it renders \emph. Looking through the documentation, I tried:
>>
>> (setq font-latex-match-italic-command-keywords '(("inldef" "{")))
>>
>> But this doesn't seem to affect the rendering (both the macro name and the
>> argument are rendered as for any other user macro).
>>
>> My macro is defined simply as:
>>
>> \newcommand{\inldef}{\emph}
>>
>> This doesn't change anything either:
>>
>> \newcommand{\inldef}[1]{\emph{#1}}
>
> AUCTeX can parse defintions and add them to completion list, but
> automatic catering for fontification is not possible.
Are you sure? Because I use `font-latex-match-bold-command-keywords'
and fontification just happens. However, if you read the documentation
for font-latex-*-command-keywords, you see that you can't simply set it.
I used customize and have since restarted Emacs, so I don't know if
customize can update it in the running instance of Emacs. You should
be able to use setq as well, as long as you ensure you set it _before_
AUCTeX is loaded.
-Ivan