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

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

[nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas st


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas starting at bol.
Date: Sat, 29 Jan 2022 08:27:16 -0500 (EST)

branch: elpa/nix-mode
commit aa47e0c5aedf950a2bd945735efa180995f3dad3
Author: Jakub Piecuch <j.piecuch96@gmail.com>
Commit: Jakub Piecuch <j.piecuch96@gmail.com>

    Fix indentation of lambdas starting at bol.
---
 nix-mode.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index c03aef08f5..afb3aa96c1 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -444,9 +444,13 @@ STRING-TYPE type of string based off of Emacs syntax table 
types"
     (`(:after . ":")
      ;; Skip over the argument.
      (smie-backward-sexp " -bseqskip- ")
-     (if (smie-rule-bolp)
-         `(column . ,(current-column))
-       (nix-smie--indent-anchor)))
+     (cond
+      ((smie-rule-bolp)
+       `(column . ,(current-column)))
+      ((= (current-indentation) 0)
+       '(column . 0))
+      (t
+       (nix-smie--indent-anchor))))
     (`(:after . ",")
      (smie-rule-parent tab-width))
     (`(:before . ",")



reply via email to

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