On 2015-11-30, at 14:32, Mosè Giordano <[email protected]> wrote: > 2015-11-30 12:55 GMT+01:00 jfbu <[email protected]>: >> I had to grab 354 lines before the offending location to find an isolated >> $ which confuses AUCTeX. >> >> Although all the intervening macro definitions never define a paragraph, >> there were a few paragraphs inside the intervening comments >> >> Hence it seems that texmathp does not identify such paragraphs ? > > I've never looked at how texmathp counts the paragraphs, but I > wouldn't be really surprised if it failed inside comments. I mean, > there is a lot of work (made by Ralf, if I remember well) to make > AUCTeX correctly handle dtx comments like if they were normal text, > and texmathp doesn't rely on the rest of AUCTeX for his parsing > purposes (indeed it doesn't require AUCTeX at all to work), so it's > possible that it wasn't optimized to work also in dtx files.
Mosè, I have to finally analyse your patch to the bug we talked about (sorry for my terrible delay!), but let me chime in again here, since I've studied large parts of texmathp recently. The only place `texmathp-search-n-paragraphs' is used is this (and apparently it's also buggy!!!): (re-search-backward "[\n\t][ \t]*[\n\r]" nil 1 texmathp-search-n-paragraphs) I'm pretty sure it should say \r instead of \t (the first occurrence). (And it still does not solve the dtx problem, I guess.) > Bye, > Mosè Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University _______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
