[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fontifying latex.ltx
From: |
Harald Hanche-Olsen |
Subject: |
Re: Fontifying latex.ltx |
Date: |
Tue, 18 Jan 2011 20:38:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (darwin) |
[Stefan Monnier <monnier@iro.umontreal.ca>]
>> Whenever I visit latex.ltx, I encounter two rather annoying problems
>> with the resulting fontification via font-lock-mode:
>
>> 1. In the definition \def\verb{...,
>
> Indeed, the \verbC...C fontification gets triggered incorrectly there.
> Hmm...kind of a pain to try and detect such corner cases.
> In the mean time you can circumvent the problem with %{
Except for the pain of modifying code that isn't mine and that will
change back on the next software update, I could.
> I've just fixed the code in Emacs's trunk so we only highlight \verb+..+
> if it spans a single line.
Great. Since I do track the trunk, I'll soon have it.
> [...] whereas "odd" LaTeX structures
> are used even by normal LaTeX users (tho \def\verb arguably is not).
Yeah, it doesn't happen to me very often in my everyday LaTeX usage,
and when it does, I can usually work around it using a well placed
comment. I am used to that. But still, it might be nice perhaps to have
a pair of special comments I could put in LaTeX code, that would have
the side effect of turning off fontification in between.
> [...] (see the value of font-lock-defaults when in latex-mode), which
> is why your change had no effect. Instead, you'll want to replace
> ((?$ . "\"")) with nil.
That did it. Thanks!
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell