auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 40b9319b80cd5ad689212


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 40b9319b80cd5ad6892126b03599cdc626837d59
Date: Sun, 25 Apr 2021 05:38:09 -0400 (EDT)

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  40b9319b80cd5ad6892126b03599cdc626837d59 (commit)
      from  98455d05f0acf1630dea7a18f5f0b360323c58f1 (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 40b9319b80cd5ad6892126b03599cdc626837d59
Author: Tassilo Horn <tsdh@gnu.org>
Date:   Sun Apr 25 11:34:34 2021 +0200

    Fix matching of script chars (bug#48012)
    
    * font-latex.el (font-latex-match-script-chars): Don't stop after
    findind the first script char which turns out not to be an actual
    script char (bug#48012).

diff --git a/font-latex.el b/font-latex.el
index 7ba3792..906afc9 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -2141,19 +2141,21 @@ set to french, and >>german<< (and 8-bit) are used if 
set to german."
 
 (defun font-latex-match-script-chars (limit)
   "Match subscript and superscript chars up to LIMIT."
-  (and (re-search-forward "[^_^]\\([_^]\\)" limit t)
-       (let ((pos (match-beginning 1)))
-         (and (font-latex-faces-present-p 'font-latex-math-face pos)
-              (not (font-latex-faces-present-p '(font-lock-constant-face
-                                                 font-lock-builtin-face
-                                                 font-lock-comment-face
-                                                 font-latex-verbatim-face) 
pos))
-              ;; Check for backslash quoting
-              (not (let ((odd nil)
-                         (pos pos))
-                     (while (eq (char-before pos) ?\\)
-                       (setq pos (1- pos) odd (not odd)))
-                     odd))))))
+  (catch 'found
+    (while (re-search-forward "[^_^]\\([_^]\\)" limit t)
+      (let ((pos (match-beginning 1)))
+        (when (and (font-latex-faces-present-p 'font-latex-math-face pos)
+                   (not (font-latex-faces-present-p '(font-lock-constant-face
+                                                      font-lock-builtin-face
+                                                      font-lock-comment-face
+                                                      
font-latex-verbatim-face) pos))
+                   ;; Check for backslash quoting
+                   (not (let ((odd nil)
+                              (pos pos))
+                          (while (eq (char-before pos) ?\\)
+                            (setq pos (1- pos) odd (not odd)))
+                          odd)))
+          (throw 'found t))))))
 
 (defun font-latex--get-script-props (pos script-type)
   (let* ((old-raise (or (plist-get (get-text-property pos 'display) 'raise) 
0.0))

-----------------------------------------------------------------------

Summary of changes:
 font-latex.el | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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