branch: elpa/nix-mode
commit b12aeada4195425689fa3958a96e28a2960ccd82
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>
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 "# ")