[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumsta
From: |
Mosè Giordano |
Subject: |
Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances |
Date: |
Wed, 15 Jan 2014 00:06:04 +0100 |
2014/1/14 Ralf Angeli <address@hidden>:
> [...]
> IIRC this type of
> problem was one of the reasons for switching from a regexp to
> `TeX-escaped-p' for similar cases. So perhaps that would really be the
> better option.
but the only implementation of regexp + something-like-TeX-escaped-p I
was able to make fails with
\$$something$
:-(
What it does is the following:
- search for `$' or `$$';
- check whether there is an even number of escapes before the found
string, but this doesn't make sense with `$$' since only the first
dollar sign is escaped.
It could be improved with something like this:
a) search for `$';
b) check whether there in even number of escapes before it;
c) if b)-test is positive: check if there is an additional dollar
following the first `$';
d) if b)-test is negative: restart from a).
Can this work?
Bye,
Mosè