>>>>> Ikumi Keita <[email protected]> writes:
> It seems that the regexp in `LaTeX-fill-region-as-paragraph' to identify
> a code comment isn't wise enough:
> ----------------------------------------------------------------------
> (if (re-search-forward
> (concat "\\("
> ;; Code comments.
> "\\([^ \r\n%\\]\\|\\\\%\\)\\([ \t]\\|\\\\\\\\\\)*"
> TeX-comment-start-regexp
> "\\|"
> [...]
> ----------------------------------------------------------------------
> This doesn't match lines which end with "\ %%". I'll try to find
> something better.
I think the attached patch fixes the problem. Could you test whether it
works on your side?
I confirmed this fix passes regression test, but would appreciate if
others also could have a look to find any possible regression.
Regards,
Ikumi Keita
diff --git a/latex.el b/latex.el
index 05238344..6b464d50 100644
--- a/latex.el
+++ b/latex.el
@@ -4022,7 +4022,7 @@ performed in that case."
(if (re-search-forward
(concat "\\("
;; Code comments.
- "\\([^ \r\n%\\]\\|\\\\%\\)\\([ \t]\\|\\\\\\\\\\)*"
+ "\\([^ \r\n%\\]\\|\\\\[% ]\\)\\([ \t]\\|\\\\\\\\\\)*"
TeX-comment-start-regexp
"\\|"
;; Lines ending with `\par'.
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex