[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: |
Sat, 11 Jan 2014 01:36:44 +0100 |
Hi Dylan,
2014/1/10 Dylan Thurston <address@hidden>:
> AUCTeX can get confused about when to insert smart quotes. Apparently
> this happens when a $ immediately follows a forced newline with \\. Here
> is a minimal file:
>
> --------------------
> \documentclass{article}
> \begin{document}
> ``test'' % Smart quotes work here as normal
> \centerline{$a$ \\ $b$}
> ``test'' % Still works here
> \centerline{$a$\\$b$}
> "test" % Smart quotes have stopped working
> \end{document}
> --------------------
>
> Note that systax highlighting works as normal, and AUCTeX is not
> otherwise confused about whether I am in math mode.
>
thanks for your report. The problem is in the `texmathp' function,
and in particular in the regexp used for searching math togglers, ie
`texmathp-toggle-regexp'. Its value is
"\\([^\\\\\\$]\\|\\`\\)\\(\\$\\$\\|\\$\\)", but this doesn't match a
dollar preceded by two escapes.
"\\(\\\\\\\\\\|[^\\\\\\$]\\|\\`\\)\\(\\$\\$\\|\\$\\)" should do the
trick, but I'd like a confirmation by someone more experienced in
regexps than me. Actually we should make sure there is an even number
of escapes, not just two, then perhaps something like `TeX-escaped-p'
might be needed.
Bye,
Mosè
- [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Dylan Thurston, 2014/01/10
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances,
Mosè Giordano <=
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Dylan Thurston, 2014/01/11
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Ralf Angeli, 2014/01/11
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Mosè Giordano, 2014/01/11
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Ralf Angeli, 2014/01/12
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Mosè Giordano, 2014/01/12
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Ralf Angeli, 2014/01/14
- Re: [Bug-AUCTeX] 11.87; Failure to insert smart quotes in some circumstances, Mosè Giordano, 2014/01/14