summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-24 23:30:03 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-24 23:30:03 +0100
commite8492f444d2532b48b6a17a4dec8dbc16d963563 (patch)
tree15513f2fca2e361e8f92cd09f88a8a62dfa36be9 /elisp
parent3785538c8c5712cda4d4758e5c6c317f9db55657 (diff)
downloadgeiser-e8492f444d2532b48b6a17a4dec8dbc16d963563.tar.gz
geiser-e8492f444d2532b48b6a17a4dec8dbc16d963563.tar.bz2
company-mode fixes (an attempt to fix #32231)
i hope the anonymous reporter will check this...
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-company.el7
-rw-r--r--elisp/geiser-repl.el2
2 files changed, 4 insertions, 5 deletions
diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el
index 8f7fca6..09290be 100644
--- a/elisp/geiser-company.el
+++ b/elisp/geiser-company.el
@@ -1,6 +1,6 @@
;; geiser-company.el -- integration with company-mode
-;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -91,11 +91,10 @@
(defun geiser-company--setup-company (enable)
(set (make-local-variable 'company-default-lighter) "/C")
(set (make-local-variable 'company-echo-delay) 0.01)
- (company-mode nil)
- (when enable (company-mode enable)))
+ (setq company-backends (list geiser-company--backend))
+ (company-mode (if enable 1 -1)))
(geiser-company--make-backend company-geiser-ids nil)
(geiser-company--make-backend company-geiser-modules t)
- (add-to-list 'company-backends geiser-company--backend)
(add-hook 'company-completion-finished-hook
'geiser-company--restore-autodoc)
(add-hook 'company-completion-cancelled-hook
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 54da070..25cb116 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -266,6 +266,7 @@ module command as a string")
deb-prompt-rx))
(geiser-repl--startup impl address)
(geiser-repl--autodoc-mode 1)
+ (geiser-company--setup geiser-repl-company-p)
(message "%s up and running!" (geiser-repl--repl-name impl))))
(defun geiser-repl--start-scheme (impl address prompt)
@@ -503,7 +504,6 @@ buffer."
(geiser-completion--setup t)
(setq geiser-smart-tab-mode-string "")
(geiser-smart-tab-mode t)
- (geiser-company--setup geiser-repl-company-p)
;; enabling compilation-shell-minor-mode without the annoying highlighter
(compilation-setup t))