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

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

[elpa] externals/auctex b852059 10/34: ; Improve previous commit


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

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

    ; Improve previous commit
---
 font-latex.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/font-latex.el b/font-latex.el
index 455a603..e852ea7 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1909,7 +1909,15 @@ 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)
-              (nth 4 ppss)))
+              (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"))))))
         (skip-chars-forward "$" limit))
        ;; check 2: Else, is "$" escaped?
        ((TeX-escaped-p)



reply via email to

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