branch: elpa/systemd
commit 921f8d0df8d5ea13946522337f75e67bdc16b21c
Author: Mark Oteiza <[email protected]>
Commit: Mark Oteiza <[email protected]>
nix systemd-use-company-p
---
systemd.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/systemd.el b/systemd.el
index 34ccedb..40f71ec 100644
--- a/systemd.el
+++ b/systemd.el
@@ -70,9 +70,10 @@
(function :tag "Other function"))
:group 'systemd)
-(defcustom systemd-use-company-p nil
- "Whether to use `company-mode' for completion, if available."
- :type 'boolean
+(defcustom systemd-mode-hook nil
+ "Hook run after entering `systemd-mode'."
+ :type 'hook
+ :options '(company-mode)
:group 'systemd)
(defconst systemd-unit-sections
@@ -380,8 +381,6 @@ Key bindings:
\\{systemd-mode-map}"
(set-keymap-parent systemd-mode-map nil)
(conf-mode-initialize systemd-comment-start)
- (if (and systemd-use-company-p (fboundp 'company-mode))
- (company-mode 1))
(add-hook 'company-backends #'systemd-company-backend)
(add-hook 'completion-at-point-functions #'systemd-complete-at-point)
(setq-local font-lock-defaults '(systemd-font-lock-keywords)))