2015-11-15 15:54 GMT+01:00 Mosè Giordano <[email protected]>:
> Hi Marcin,
>
> 2015-11-14 0:19 GMT+01:00 Marcin Borkowski <[email protected]>:
>> Hi all,
>>
>> I'm currently reading the source for texmathp, and I've just found
>> a bug.  Assuming that "|" is the position of point, evaluating
>> (texmathp) in this situation: "\\$|...$" yields nil instead of t.  The
>> culprit is the texmathp-onoff-regexp variable.
>
> Did you mean `texmathp-toggle-regexp`?  I can't see how
> `texmathp-onoff-regexp` affects this behavior.  Do you have
> suggestions for fixing this?

How about the attached patch?  I thought at first something like

    "\\([^\\\\\\$]\\(?:\\\\\\\\\\)*\\|\\`\\)\\(\\$\\$\\|\\$\\)"

for the value of ``texmathp-toggle-regexp', but this doesn't work in the case of

    $...$\\\\$|...$

with point at "|".

Actually, it would be better to have a mechanism based only on
re-search-forward, instead of re-search-forward + skip-chars-backward,
because of performance reasons.  Comments welcome.

Bye,
Mosè

_______________________________________________
auctex-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-devel

Reply via email to