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

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

[nongnu] elpa/nix-mode dc705bb4df 057/500: Disable generic hanging inden


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode dc705bb4df 057/500: Disable generic hanging indent.
Date: Sat, 29 Jan 2022 08:26:36 -0500 (EST)

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

    Disable generic hanging indent.
    
    It was picking up extra imports.
---
 nix-mode.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index 9255b5db9d..0ba098bfc2 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -158,6 +158,9 @@ If a close brace `}' ends an antiquote, the next character 
begins a string."
     (setq p1 (point))
     (setq p2 (nth 1 (syntax-ppss)))
 
+    (if (eq p2 1)
+       (setq n (1+ n)))
+
     (while (and p2 (not (eq p2 1)))
       (goto-char p2)
       (backward-char)
@@ -234,13 +237,8 @@ If a close brace `}' ends an antiquote, the next character 
begins a string."
        (looking-back "//" 1)
        (looking-back ")" 1)
        (looking-back "}" 1)
-       (looking-back "\"" 1)
        ;; (looking-back ":" 1)
-       (and
-               (looking-back "[a-zA-Z0-9]" 1)
-               (not (looking-back "[[:space:]]in" 1))
-               (not (looking-back "^in" 1))
-               (not (looking-back "let" 1)))))))
+       (looking-back "\"" 1)))))
 
 (defun nix-indent-level ()
   "Get current indent level."



reply via email to

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