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

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

[nongnu] elpa/nix-mode de02e17924 135/500: Fix fontification of "}${" in


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode de02e17924 135/500: Fix fontification of "}${" in some contexts
Date: Sat, 29 Jan 2022 08:26:52 -0500 (EST)

branch: elpa/nix-mode
commit de02e179247b73966d17da23cc9223abacdb8eed
Author: Leon Isenberg <ljli@users.noreply.github.com>
Commit: Leon Isenberg <ljli@users.noreply.github.com>

    Fix fontification of "}${" in some contexts
---
 nix-mode.el | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index b99b2efafd..282078abbf 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -180,16 +180,18 @@
 
 (defun nix--antiquote-close-open ()
   (let* ((start (match-beginning 0))
-         (ps (nix--get-parse-state start)))
-    (when (and (not (nix--get-string-type ps))
-               (nix--open-brace-antiquote-p ps))
-      (let ((string-type (nix--open-brace-string-type ps)))
-        (put-text-property start (+ 3 start)
-                           'nix-string-type string-type)
-        (put-text-property start (1+ start)
-                           'nix-syntax-antiquote t)
-        (put-text-property (+ 2 start) (+ 3 start)
-                           'nix-syntax-antiquote t)))))
+         (ps (nix--get-parse-state start))
+         (string-type (nix--get-string-type ps)))
+    (if string-type
+        (nix--antiquote-open-at (1+ start) string-type)
+      (when (nix--open-brace-antiquote-p ps)
+        (let ((string-type (nix--open-brace-string-type ps)))
+          (put-text-property start (+ 3 start)
+                             'nix-string-type string-type)
+          (put-text-property start (1+ start)
+                             'nix-syntax-antiquote t)
+          (put-text-property (+ 2 start) (+ 3 start)
+                             'nix-syntax-antiquote t))))))
 
 (defun nix--antiquote-close ()
   (let* ((start (match-beginning 0))



reply via email to

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