auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex 2959334 11/34: ; Improve previous


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 2959334 11/34: ; Improve previous commit again
Date: Sun, 6 Jun 2021 11:40:02 -0400 (EDT)

branch: externals/auctex
commit 2959334f519ae687966a33120335034a460fb3bf
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>

    ; Improve previous commit again
---
 font-latex.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index e852ea7..ee2b99f 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1909,15 +1909,14 @@ signs to follow the point and must be 1 or 2."
        ;; check 1: Are we in a verbatim construct or comment?
        ((let ((ppss (syntax-ppss)))
           (or (nth 3 ppss)
+              ;; Ignore $ in comments...
               (and (nth 4 ppss)
-                   ;; Ok, we are in a comment, so basically we should
-                   ;; ignore this $.  However, we need to keep our %$
-                   ;; workaround intact if there has been a valid
-                   ;; occurrence of $ in a non-math context.
-                   (not (and
-                         (looking-back
-                          (concat TeX-comment-start-regexp "[ \t]*"))
-                         (looking-at "[$][ \t]*\n"))))))
+                   ;; ... except if we're looking for the end of the
+                   ;; inline math.  We need to consider this %$
+                   ;; comments because they are the workaround for
+                   ;; falsely triggered math mode due to valid,
+                   ;; non-math occurrences of $.
+                   (not num))))
         (skip-chars-forward "$" limit))
        ;; check 2: Else, is "$" escaped?
        ((TeX-escaped-p)




reply via email to

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