This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via 2ca3d1856a033ee748a8b4a2edf99aa2640ada3d (commit)
from 14e485c252756b91e4373fd22cdeecfa5e55403a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2ca3d1856a033ee748a8b4a2edf99aa2640ada3d
Author: Ikumi Keita <[email protected]>
Date: Thu Jul 8 01:50:22 2021 +0900
Fix slowdown of font lock in doctex mode
`texmathp' limits search by looking for empty lines, which appear
frequently in LaTeX documents. However, docTeX documents often lack
such true empty lines. In such buffer, `texmathp' must search
from (point-min) every time, which slowed down font lock operation
siginificantly.
* texmathp.el (texmathp): Adjust regular expression so that a line
containing only whitespaces except consecutive %'s at its beginning
is considered as empty in doctex mode buffer.
diff --git a/texmathp.el b/texmathp.el
index ac2b75c..b0fd02d 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -274,7 +274,10 @@ See the variable `texmathp-tex-commands' about which
commands are checked."
(interactive)
(let* ((pos (point)) math-on sw-match
(bound (save-excursion
- (if (re-search-backward "[\n\r][ \t]*[\n\r]"
+ (if (re-search-backward
+ (if (eq major-mode 'doctex-mode)
+ "[\n\r]%*[ \t]*[\n\r]"
+ "[\n\r][ \t]*[\n\r]")
nil 1 texmathp-search-n-paragraphs)
(match-beginning 0)
(point-min))))
-----------------------------------------------------------------------
Summary of changes:
texmathp.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hooks/post-receive
--
GNU AUCTeX
_______________________________________________
auctex-diffs mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex-diffs