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

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

[elpa] externals/auctex 70907dd 09/34: Skip inline math $ inside comment


From: Tassilo Horn
Subject: [elpa] externals/auctex 70907dd 09/34: Skip inline math $ inside comments (bug#48365)
Date: Sun, 6 Jun 2021 11:40:01 -0400 (EDT)

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

    Skip inline math $ inside comments (bug#48365)
    
    * font-latex.el (font-latex-find-dollar-math): Skip inline math $
    inside comments.
---
 font-latex.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index bbaad61..455a603 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1906,8 +1906,10 @@ signs to follow the point and must be 1 or 2."
       ;; If that "$" is not our target, skip over it and search
       ;; again.
       (cond
-       ;; check 1: Are we in a verbatim construct?
-       ((nth 3 (syntax-ppss))
+       ;; check 1: Are we in a verbatim construct or comment?
+       ((let ((ppss (syntax-ppss)))
+          (or (nth 3 ppss)
+              (nth 4 ppss)))
         (skip-chars-forward "$" limit))
        ;; check 2: Else, is "$" escaped?
        ((TeX-escaped-p)



reply via email to

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