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

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

[nongnu] elpa/nix-mode ff550f9bbd 036/500: Add comments.


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode ff550f9bbd 036/500: Add comments.
Date: Sat, 29 Jan 2022 08:26:33 -0500 (EST)

branch: elpa/nix-mode
commit ff550f9bbd8422c7c2e2269e82d69b811a5dcf57
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>

    Add comments.
---
 nix-mode.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/nix-mode.el b/nix-mode.el
index 6ea8a238f6..fa727c8a71 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -168,7 +168,7 @@ If a close brace `}' ends an antiquote, the next character 
begins a string."
   (save-excursion
     (beginning-of-line)
     (skip-chars-forward "[:space:]")
-    (or
+    (or ;; any of these should -1 indent level
      (looking-at ")")
      (looking-at "}")
      (looking-at "''")
@@ -185,10 +185,15 @@ If a close brace `}' ends an antiquote, the next 
character begins a string."
       (forward-line -1)
       (end-of-line)
       (skip-chars-backward "\n[:space:]")
+
+      ;; skip through any comments in the way
       (while (nth 4 (syntax-ppss))
        (goto-char (nth 8 (syntax-ppss)))
        (skip-chars-backward "\n[:space:]"))
+
       (forward-char -1)
+
+      ;; any of these should be ignored
       (unless (or
               (and (looking-at "/") (looking-back "*"))
               (looking-at ";")



reply via email to

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