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

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

[nongnu] elpa/nix-mode 236318101e 217/500: Cleanup global-nix-mode


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 236318101e 217/500: Cleanup global-nix-mode
Date: Sat, 29 Jan 2022 08:27:08 -0500 (EST)

branch: elpa/nix-mode
commit 236318101ef47d4a98f882175517a955635bdb47
Author: Matthew Bauer <matthew.bauer@obsidian.systems>
Commit: Matthew Bauer <matthew.bauer@obsidian.systems>

    Cleanup global-nix-mode
---
 nix.el | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/nix.el b/nix.el
index f6215b5be2..cb8fe452e8 100644
--- a/nix.el
+++ b/nix.el
@@ -87,21 +87,16 @@ ATTRIBUTE from PATH to get Nix expressions from."
                               nix-shell-executable
                               path attribute)))
 
-
 ;;;###autoload
 (define-minor-mode global-nix-mode
   "Minor mode to enable Nix enhancements."
   :require 'nix
   :global t
-  (cond
-   (global-nix-mode
+  (when global-nix-mode
     (add-to-list 'interpreter-mode-alist '("nix-shell" . nix-shebang-mode))
     (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
     (add-to-list 'auto-mode-alist '("\\.drv\\'" . nix-drv-mode))
-    (add-hook 'nix-mode-hook (lambda () (setq-local company-backends 
'(company-nix))))
-    )
-   (t
-    ())))
+    (add-hook 'after-change-major-mode-hook 'nix-shell-mode)))
 
 (provide 'nix)
 ;;; nix.el ends here



reply via email to

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