[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/systemd 8742607120 2/2: stop clobbering company-backends
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/systemd 8742607120 2/2: stop clobbering company-backends |
Date: |
Tue, 31 Jan 2023 23:00:02 -0500 (EST) |
branch: elpa/systemd
commit 8742607120fbc440821acbc351fda1e8e68a8806
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>
stop clobbering company-backends
* using add-hook to modify company-backends is bad juju
* there does not appear to be a sensible way for a mode to
modify company-backends either in the variable docstring or the
online documentation here
https://company-mode.github.io/manual/Backends.html
so... we should not modify it.
* document the added effort to use the company backend
* the only additional fanciness to `systemd-company-backend' is that
it will automatically insert an = after completing a directive, so
it might be nice to work that into the capf completion somehow and
trash the company-specific code
---
systemd.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/systemd.el b/systemd.el
index dff90050bd..6db040386e 100644
--- a/systemd.el
+++ b/systemd.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2014-2023 Mark Oteiza <mvoteiza@udel.edu>
;; Author: Mark Oteiza <mvoteiza@udel.edu>
-;; Version: 1.6
+;; Version: 1.6.1
;; Package-Requires: ((emacs "24.4"))
;; Keywords: tools, unix
@@ -33,7 +33,8 @@
;; network configuration. Both a completer for
;; `completion-at-point-functions' and a company backend are provided.
;; The latter can be enabled by adding `company-mode' to
-;; `systemd-mode-hook'.
+;; `systemd-mode-hook' and adding `systemd-company-backend' to
+;; `company-backends'.
;;; Code:
@@ -406,7 +407,6 @@ Key bindings:
(set-keymap-parent systemd-mode-map nil)
(conf-mode-initialize systemd-comment-start)
(setq-local auto-fill-inhibit-regexp "^[ \t]*?[^;#]")
- (add-hook 'company-backends #'systemd-company-backend nil 'local)
(add-hook 'completion-at-point-functions #'systemd-complete-at-point nil t)
(add-hook 'font-lock-extend-region-functions
'systemd-font-lock-extend-region nil t)