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

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

[nongnu] elpa/sweeprolog e093da4af7: FIXED: only consider backslash as a


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog e093da4af7: FIXED: only consider backslash as an escape inside strings
Date: Tue, 8 Nov 2022 07:59:35 -0500 (EST)

branch: elpa/sweeprolog
commit e093da4af7259f960c613df6d9c6b6fe3ccc0c9b
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    FIXED: only consider backslash as an escape inside strings
---
 sweeprolog.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index 060c8ea747..a4dd6dd05d 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -80,6 +80,7 @@ Prolog token as returned from 
`sweeprolog-last-token-boundaries'.")
     (modify-syntax-entry ?~ "." table)
     (modify-syntax-entry ?_ "_" table)
     (modify-syntax-entry ?| "." table)
+    (modify-syntax-entry ?\\ "\\" table)
     (modify-syntax-entry ?\' "\"" table)
     (modify-syntax-entry ?` "\"" table)
     (modify-syntax-entry ?% "<" table)
@@ -1993,10 +1994,13 @@ modified."
   (let ((case-fold-search nil))
     (funcall
      (syntax-propertize-rules
+      ((rx (group-n 1 "\\") anychar)
+       (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
+            (string-to-syntax "."))))
       ((rx bow (group-n 1 "0'" anychar))
        (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
             (string-to-syntax "w"))))
-      ((rx bow (group-n 1 "!") eow)
+      ((rx bow (group-n 1 "!"))
        (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
             (string-to-syntax "w")))))
      start end)))



reply via email to

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