diff options
author | Dan Leslie <dan@ironoxide.ca> | 2016-01-07 16:32:38 -0800 |
---|---|---|
committer | Dan Leslie <dan@ironoxide.ca> | 2016-01-07 16:32:38 -0800 |
commit | 8067a4ed730195664f3f63b6ee35cb9c2647608b (patch) | |
tree | e4a18feb1d8cd15308a16dc0870e5663b804d8db /elisp/geiser-company.el | |
parent | f52d4d256cd585ff81b31604b229ea5a6da2461e (diff) | |
download | geiser-8067a4ed730195664f3f63b6ee35cb9c2647608b.tar.gz geiser-8067a4ed730195664f3f63b6ee35cb9c2647608b.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.el | 7 |
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) |