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

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

[elpa] externals/tex-parens aa11f6c222 42/62: fix bug for detection of c


From: ELPA Syncer
Subject: [elpa] externals/tex-parens aa11f6c222 42/62: fix bug for detection of comments and quotes in math
Date: Thu, 6 Jun 2024 04:01:00 -0400 (EDT)

branch: externals/tex-parens
commit aa11f6c222755be2b0499b8f61608d7c4e6bca2b
Author: Paul Nelson <ultrono@gmail.com>
Commit: Paul Nelson <ultrono@gmail.com>

    fix bug for detection of comments and quotes in math
    
    should always check font at the beginning of the match
---
 tex-parens.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tex-parens.el b/tex-parens.el
index 2b82be2bda..d7bfb8944e 100644
--- a/tex-parens.el
+++ b/tex-parens.el
@@ -292,8 +292,12 @@ then ignore comments; these are detected via
 `font-lock-comment-face'.  If M-STR is a double prime in math
 mode, then ignore it.  If M-STR is a dollar delimiter that does
 not demarcate math mode, then ignore it."
-  (or (and tp-ignore-comments (tp--comment))
-      (and (equal m-str "''") (> (tp--math-face) 0))
+  (or (and tp-ignore-comments
+           (save-excursion (goto-char m-begin)
+                           (tp--comment)))
+      (and (equal m-str "''")
+           (save-excursion (goto-char m-begin)
+                           (> (tp--math-face) 0)))
       (and (member m-str '("$" "$$"))
            (equal (save-excursion (goto-char (1- m-begin))
                                   (tp--math-face))



reply via email to

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