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

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

[nongnu] elpa/nix-mode b12aeada41 334/500: Don’t use smie-indent-line w


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode b12aeada41 334/500: Don’t use smie-indent-line when nix-mode-use-smie is nil
Date: Sat, 29 Jan 2022 08:27:18 -0500 (EST)

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

    Don’t use smie-indent-line when nix-mode-use-smie is nil
---
 nix-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/nix-mode.el b/nix-mode.el
index 4fddae5862..eff49a5d6d 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -938,7 +938,11 @@ The hook `nix-mode-hook' is run when Nix mode is started.
          (symbol-function 'nix-smie--indent-close)))
 
   ;; Automatic indentation [C-j]
-  (setq-local indent-line-function (lambda () (funcall nix-indent-function)))
+  (setq-local indent-line-function (lambda ()
+                                    (if (and (not nix-mode-use-smie)
+                                             (eq nix-indent-function 
'smie-indent-line))
+                                        (indent-relative)
+                                      (funcall nix-indent-function))))
 
   ;; Indenting of comments
   (setq-local comment-start "# ")



reply via email to

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