Open DanGrayson opened 2 years ago
I was working on some code a few months ago that might help out with this. Check out https://github.com/Macaulay2/M2-emacs/pull/31.
We could simplify the regular expression drastically to "///.*///", and not worry about getting every single case correct.
You could use "lookarounds" instead.
We could simplify the regular expression drastically to "///.*///", and not worry about getting every single case correct.
You could use "lookarounds" instead.
Does emacs implement those?
I was working on some code a few months ago that might help out with this. Check out Macaulay2/M2-emacs#31.
Would (could) that be ready soon?
I was working on some code a few months ago that might help out with this. Check out Macaulay2/M2-emacs#31.
Would (could) that be ready soon?
The part that highlights ///
-delimited strings is ready, with the big caveat that it currently breaks syntax highlighting inside doc
and TEST
strings. That's why I left it as a draft -- I'm not sure if that's a dealbreaker or not.
The desire to highlight the contents of such big strings is perhaps a good argument against doing any highlighting of those big strings as strings.
The desire to highlight the contents of such big strings is perhaps a good argument against doing any highlighting of those big strings as strings.
That makes sense! I removed the ///
-related commits from M2-emacs#31..
Is this still an issue after https://github.com/Macaulay2/M2-emacs/pull/31?
I use the code
to try to highlight strings delimited by /// ... ///, but the regular expression is so complicated (with backtracking) that it can sometimes cause a delay up to 45 seconds when using C-s to search through a file, as @mikestillman has observed.
We could simplify the regular expression drastically to "///.*///", and not worry about getting every single case correct.