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

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

[nongnu] elpa/nix-mode 2de7d1d585 088/500: Don't require company to be i


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 2de7d1d585 088/500: Don't require company to be installed.
Date: Sat, 29 Jan 2022 08:26:38 -0500 (EST)

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

    Don't require company to be installed.
---
 nix-mode.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/nix-mode.el b/nix-mode.el
index 8e1d309a7c..6e03e2635d 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -15,8 +15,6 @@
 
 ;;; Code:
 
-(require 'company)
-
 ;; Emacs 24.2 compatability
 (unless (fboundp 'setq-local)
   (defmacro setq-local (var val)
@@ -495,6 +493,10 @@ If a close brace `}' ends an antiquote, the next character 
begins a string."
 
 (when (featurep 'flycheck) (require 'nix-flycheck))
 
+(when (require 'company nil 'noerror) (add-to-list
+                                       'company-backends
+                                       'company-nix))
+
 ;;;###autoload
 (define-derived-mode nix-mode prog-mode "Nix"
   "Major mode for editing Nix expressions.
@@ -547,11 +549,7 @@ The hook `nix-mode-hook' is run when Nix mode is started.
   (setq-local paragraph-start "[ \t]*\\(#+[ \t]*\\)?$")
   (setq-local paragraph-separate paragraph-start)
 
-  (easy-menu-add nix-mode-menu nix-mode-map)
-
-  ;; Company
-  (add-to-list 'company-backends 'company-nix)
-  (company-mode))
+  (easy-menu-add nix-mode-menu nix-mode-map))
 
 ;;;###autoload
 (progn



reply via email to

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