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

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

[nongnu] elpa/nix-mode 7072348b55 03/14: Fix syntax highlighting for ''$


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 7072348b55 03/14: Fix syntax highlighting for ''$ in indented strings
Date: Tue, 19 Jul 2022 01:58:49 -0400 (EDT)

branch: elpa/nix-mode
commit 7072348b551b5921c762cb171fede1d28c7ee221
Author: Nicholas Coltharp <coltharp@pdx.edu>
Commit: Nicholas Coltharp <coltharp@pdx.edu>

    Fix syntax highlighting for ''$ in indented strings
---
 nix-mode.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index 73bd4af794..14f0b96060 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -244,9 +244,13 @@ STRING-TYPE type of string based off of Emacs syntax table 
types"
         (setq start (+ 2 start)))
       (when (equal (mod (- end start) 3) 2)
         (let ((str-peek (buffer-substring end (min (point-max) (+ 2 end)))))
-          (if (member str-peek '("${" "\\n" "\\r" "\\t"))
-              (goto-char (+ 2 end))
-            (nix--mark-string (1- end) ?\')))))))
+          (cond
+           ((member str-peek '("${" "\\n" "\\r" "\\t"))
+            (goto-char (+ 2 end)))
+           ((equal (substring str-peek 0 1) "$")
+            (goto-char (+ 1 end)))
+           (t
+            (nix--mark-string (1- end) ?\'))))))))
 
 (defun nix--escaped-antiquote-dq-style ()
   "Handle Nix escaped antiquote dq style."



reply via email to

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