emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 7cd0cdd60a 37/39: Speed up parsing


From: Tassilo Horn
Subject: [elpa] externals/auctex 7cd0cdd60a 37/39: Speed up parsing
Date: Thu, 20 Jul 2023 04:21:51 -0400 (EDT)

branch: externals/auctex
commit 7cd0cdd60ac84fb39ab56c46c9b5e53b91b5806f
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Speed up parsing
    
    * tex.el (TeX-normal-mode): Temporarily bind `gc-cons-percentage'
    to a higher value during parsing.  See related discussion:
    https://lists.gnu.org/archive/html/auctex-devel/2023-07/msg00015.html
---
 tex.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tex.el b/tex.el
index 064e694d50..7974698069 100644
--- a/tex.el
+++ b/tex.el
@@ -6125,14 +6125,15 @@ With optional argument ARG, also reload the style 
hooks."
   (if arg
       (dolist (var TeX-normal-mode-reset-list)
         (set var nil)))
-  (let ((TeX-auto-save t))
-    (if (buffer-modified-p)
-        (save-buffer)
-      (TeX-auto-write)))
-  (normal-mode)
-  ;; See also addition to `find-file-hook' in `VirTeX-common-initialization'.
-  (when (eq TeX-master 'shared) (TeX-master-file nil nil t))
-  (TeX-update-style t))
+  (let ((gc-cons-percentage 0.5))
+    (let ((TeX-auto-save t))
+      (if (buffer-modified-p)
+          (save-buffer)
+        (TeX-auto-write)))
+    (normal-mode)
+    ;; See also addition to `find-file-hook' in `VirTeX-common-initialization'.
+    (when (eq TeX-master 'shared) (TeX-master-file nil nil t))
+    (TeX-update-style t)))
 
 (defgroup TeX-quote nil
   "Quoting in AUCTeX."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]