branch: elpa/nix-mode
commit 45280331949c3d80f39a00d78c5c79367f969ed9
Author: Matthew Bauer <[email protected]>
Commit: Matthew Bauer <[email protected]>
Add "nix-mode-reload" function.
---
nix-mode.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/nix-mode.el b/nix-mode.el
index 5444dcc9af..8ada93a410 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -224,6 +224,13 @@ The hook `nix-mode-hook' is run when Nix mode is started.
(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
(add-to-list 'auto-mode-alist '("\\.nix.in\\'" . nix-mode)))
+(defun nix-mode-reload ()
+ "Reload Nix mode."
+ (interactive)
+ (unload-feature 'nix-mode)
+ (require 'nix-mode)
+ (nix-mode))
+
(provide 'nix-mode)
;;; nix-mode.el ends here