[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] Bug#624735: Displays \it with an italic '\'
From: |
Ralf Angeli |
Subject: |
Re: [AUCTeX-devel] Bug#624735: Displays \it with an italic '\' |
Date: |
Sat, 14 May 2011 21:03:37 +0200 |
* Josh Triplett (2011-05-10) writes:
> On Mon, May 09, 2011 at 10:15:45PM +0200, Ralf Angeli wrote:
>
>> Also, in which context or use case would it be a big problem if the
>> characters where not easily distinguishable?
>
> In my case, I encountered this problem when staring at a complex TeX
> macro, which ran several commands in a row, along the lines of
> \foo\it\bar\baz. The italic '\' characters caused by the formatting of
> \it caused me quite a bit of confusion when trying to decipher it, until
> I figured out that they really did represent backslashes. It took me
> some time to parse the \it in the first place, since I didn't see the
> characteristic '\'.
You'll have the same problem with something like \foo{\it\bar}. And in
Emacs' standard LaTeX mode it will be the same even without the braces.
Anyway, the font locking in AUCTeX always fontifies the whole macro,
including the backslash. I don't think it would be a good idea to break
this habit for one particular case.
In case this is really a huge problem for you, you can change the call
to `store-match-data' in `font-latex-match-command-in-braces' from
(store-match-data (list (point) (point)
(point) (point)
cbeg cend))
to
(store-match-data (list (point) (point)
(point) (point)
(1+ cbeg) cend))
--
Ralf
Re: [AUCTeX-devel] Bug#624735: Displays \it with an italic '\', Josh Triplett, 2011/05/01