summaryrefslogtreecommitdiff
path: root/elisp/geiser-company.el
diff options
context:
space:
mode:
authorDan Leslie <dan@ironoxide.ca>2016-01-07 16:32:38 -0800
committerDan Leslie <dan@ironoxide.ca>2016-01-07 16:32:38 -0800
commit296c3b687d8eeb520c7ccf52282e46dfe1ef3a4e (patch)
treee25b92cf4ae2063dc48be11604ab9270a98a3374 /elisp/geiser-company.el
parent75373ff056b536843564b3f54272417393eb4ceb (diff)
downloadgeiser-guile-296c3b687d8eeb520c7ccf52282e46dfe1ef3a4e.tar.gz
geiser-guile-296c3b687d8eeb520c7ccf52282e46dfe1ef3a4e.tar.bz2
Behave nicely with other company backends
company-backends should not be overridden by modes, as users may have additional backends that they wish to use. The appropriate behaviour is to add your backend to the company-backends list. Also removed the overriding of what ought to be user-controlled variables.
Diffstat (limited to 'elisp/geiser-company.el')
-rw-r--r--elisp/geiser-company.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el
index eea3469..4572984 100644
--- a/elisp/geiser-company.el
+++ b/elisp/geiser-company.el
@@ -110,10 +110,9 @@
('location (geiser-company--location arg))
('sorted t)))
(defun geiser-company--setup-company (enable)
- (set (make-local-variable 'company-default-lighter) "/C")
- (set (make-local-variable 'company-echo-delay) 0.01)
- (set (make-local-variable 'company-backends)
- (and enable '(geiser-company-backend)))
+ (when enable
+ (set (make-local-variable 'company-backends)
+ (add-to-list 'company-backends 'geiser-company-backend)))
(company-mode (if enable 1 -1)))
(add-hook 'company-completion-finished-hook
'geiser-company--restore-autodoc)