[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 98d0584851 4/6: Recognize backslash as part of
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 98d0584851 4/6: Recognize backslash as part of an operator in tokenization |
Date: |
Wed, 9 Nov 2022 16:59:24 -0500 (EST) |
branch: elpa/sweeprolog
commit 98d05848517a087728c9257abf1466cfd189e0c4
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Recognize backslash as part of an operator in tokenization
---
sweeprolog-tests.el | 12 ++++++------
sweeprolog.el | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index da66d0a5f3..78924f2eab 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -73,22 +73,22 @@ foo(Foo) :- bar.
(should (equal (get-text-property (+ (point-min) 3)
'font-lock-face)
'(sweeprolog-built-in-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 9)
'font-lock-face)
- '(sweeprolog-directive-default-face)))
+ '(sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 10)
'font-lock-face)
'(sweeprolog-identifier-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 13)
'font-lock-face)
- '(sweeprolog-directive-default-face)))
+ '(sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 16)
'font-lock-face)
'(sweeprolog-local-default-face
sweeprolog-predicate-indicator-default-face
- sweeprolog-directive-default-face)))
+ sweeprolog-body-default-face)))
(should (equal (get-text-property (+ (point-min) 23)
'font-lock-face)
'(sweeprolog-fullstop-default-face)))
@@ -103,7 +103,7 @@ foo(Foo) :- bar.
(should (equal (get-text-property (+ (point-min) 39)
'font-lock-face)
'(sweeprolog-undefined-default-face
- sweeprolog-clause-default-face)))))
+ sweeprolog-body-default-face)))))
(ert-deftest complete-variable ()
diff --git a/sweeprolog.el b/sweeprolog.el
index 11f6eeff4d..4b87ee0455 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -1996,7 +1996,7 @@ modified."
((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 "!"))
+ ((rx bow (group-n 1 "!") eow)
(1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
(string-to-syntax "w")))))
start end)))
@@ -2629,7 +2629,8 @@ predicate definition at or directly above POINT."
(while (and (not (eobp)) (nth 3 (syntax-ppss)))
(forward-char))
(list 'string beg (point)))
- ((= syn ?.)
+ ((or (= syn ?.)
+ (= syn ?\\))
(skip-syntax-forward ".")
(list 'operator beg (point)))
((= syn ?\()
@@ -2666,7 +2667,8 @@ predicate definition at or directly above POINT."
(= (char-syntax (char-before)) ?_)))
(skip-syntax-backward "w_")
(list 'functor (point) end))
- ((= syn ?.)
+ ((or (= syn ?.)
+ (= syn ?\\)) ; specifically, the backslash character
(skip-syntax-backward ".")
(list 'operator (point) end))
((= syn ?\()
- [nongnu] elpa/sweeprolog updated (e093da4af7 -> 62dc8088b7), ELPA Syncer, 2022/11/09
- [nongnu] elpa/sweeprolog 98d0584851 4/6: Recognize backslash as part of an operator in tokenization,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 1efafd057b 3/6: FIXED: clear syntax error face after fix more aggressively, ELPA Syncer, 2022/11/09
- [nongnu] elpa/sweeprolog 62dc8088b7 6/6: Bump version to 0.8.4, ELPA Syncer, 2022/11/09
- [nongnu] elpa/sweeprolog c1882b93d1 1/6: FIXED: simplify & make variable highlighting more reliable, ELPA Syncer, 2022/11/09
- [nongnu] elpa/sweeprolog c7b7300bda 2/6: FIXED: properly update query highlighting in the toplevel, ELPA Syncer, 2022/11/09
- [nongnu] elpa/sweeprolog 1a5f82f284 5/6: TEST: add test for updating syntax error faces, ELPA Syncer, 2022/11/09