SLIME/Company: Fix slime-company setup

master
Pierre Neidhardt 2018-10-21 13:50:51 +02:00
parent c216e66997
commit d066d70b09
1 changed files with 7 additions and 3 deletions

View File

@ -101,9 +101,13 @@
;;; Common LISP.
(setq inferior-lisp-program "sbcl --noinform")
(slime-setup '(slime-fancy slime-asdf slime-indentation))
(when (require 'slime-company nil t)
(add-to-list 'slime-contribs 'slime-company))
(with-eval-after-load 'slime
(let ((slime-extra '(slime-fancy slime-asdf slime-indentation)))
;; slime-company should not be required, see
;; https://github.com/anwyn/slime-company/issues/11.
(when (ignore-errors (find-library-name "slime-company"))
(add-to-list 'slime-extra 'slime-company))
(slime-setup slime-extra)))
;; Save SLIME history (only for inferior-lisp).
(defvar ambrevar/slime-comint-input-ring nil)