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

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

[nongnu] elpa/d-mode 5dbec4a 146/346: Convert backquote-in-backtick-stri


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 5dbec4a 146/346: Convert backquote-in-backtick-string regexp to rx
Date: Sun, 29 Aug 2021 11:00:19 -0400 (EDT)

branch: elpa/d-mode
commit 5dbec4aa1bb4133d6d813f93c7eda0f84d698b9a
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>

    Convert backquote-in-backtick-string regexp to rx
---
 d-mode.el | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index bb8848d..f08e3ef 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -602,8 +602,22 @@ Key bindings:
   ;; character '\' is treated as a punctuation symbol.  See help for
   ;; syntax-propertize-rules function for more information.
   (when (version<= "24.3" emacs-version)
-    (setq-local syntax-propertize-function
-                (syntax-propertize-rules 
("`[^\\\\`]*?\\(\\(\\\\\\)[^\\\\`]*?\\)+?`" (2 "."))))))
+    (setq-local
+     syntax-propertize-function
+     (syntax-propertize-rules
+      ((rx
+       "`"
+       (minimal-match
+        (zero-or-more
+         (not (any "`\\"))))
+       (minimal-match
+        (one-or-more
+         (submatch "\\")
+         (minimal-match
+          (zero-or-more
+           (not (any "`\\"))))))
+       "`")
+       (1 "."))))))
 
 ;;----------------------------------------------------------------------------
 ;; "Hideous hacks" to support appropriate font-lock behaviour.



reply via email to

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