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

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

[nongnu] elpa/d-mode 2682220 091/346: Merge branch 'dmakarov-master'


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 2682220 091/346: Merge branch 'dmakarov-master'
Date: Sun, 29 Aug 2021 11:00:09 -0400 (EDT)

branch: elpa/d-mode
commit 268222001113f1de8841f7227be6bce65945bcd7
Merge: fbd1f8b e19d704
Author: Russel Winder <russel@winder.org.uk>
Commit: Russel Winder <russel@winder.org.uk>

    Merge branch 'dmakarov-master'
---
 d-mode.el     | 6 +++++-
 tests/I0021.d | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/d-mode.el b/d-mode.el
index 22cbc34..6b36223 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -534,9 +534,13 @@ Key bindings:
   (c-run-mode-hooks 'c-mode-common-hook 'd-mode-hook)
   (c-update-modeline)
   (cc-imenu-init d-imenu-generic-expression)
+  ;; Generate a function that applies D-specific syntax properties.
+  ;; Concretely, inside back-quoted string literals the backslash
+  ;; 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 ("`\\(\\\\\\)`" (1 "."))))))
+                (syntax-propertize-rules ("`\\([^`]*\\(\\\\\\)[^`]*\\)+`" (2 
"."))))))
 
 ;;----------------------------------------------------------------------------
 ;; "Hideous hacks" to support appropriate font-lock behaviour.
diff --git a/tests/I0021.d b/tests/I0021.d
new file mode 100644
index 0000000..090bae6
--- /dev/null
+++ b/tests/I0021.d
@@ -0,0 +1,3 @@
+// #run: (goto-char 74) (c-literal-limits)
+// #out: (72 . 77)
+auto x = `ab\`; // something else



reply via email to

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