From: Eshel Yaron Date: Tue, 8 Nov 2022 12:29:19 +0000 (+0200) Subject: FIXED: only consider backslash as an escape inside strings X-Git-Tag: V8.5.20-sweep-0.8.4~6 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e093da4af7259f960c613df6d9c6b6fe3ccc0c9b;p=dict.git FIXED: only consider backslash as an escape inside strings --- diff --git a/sweeprolog.el b/sweeprolog.el index 060c8ea..a4dd6dd 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)))