From 296c3b687d8eeb520c7ccf52282e46dfe1ef3a4e Mon Sep 17 00:00:00 2001 From: Dan Leslie Date: Thu, 7 Jan 2016 16:32:38 -0800 Subject: 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. --- elisp/geiser-company.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'elisp') 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) -- cgit v1.2.3