Commit 9055a7e5 authored by Luís Oliveira's avatar Luís Oliveira
Browse files

Make calling slime-setup unnecessary

For a while now, the party line has been that slime-contribs is the way
to select which contribs are to be loaded. However, there were two
common scenarios that didn't work properly:

  1. (require 'slime)
     (setq slime-contribs <something>)

  2. Installing SLIME via package.el, then setting slime-contribs.

In both cases, the problem was that, after loading SLIME, changing
slime-contribs has no effect since it was only being taken into account
at load-time. This commit makes it so that we now look at slime-contribs
each time a new SLIME connection is launched.
No related merge requests found
Showing with 4 additions and 4 deletions
+4 -4
......@@ -26,7 +26,7 @@ Quick setup instructions
```el
;; Set your lisp system and, optionally, some contribs
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
(slime-setup '(slime-fancy))
(setq slime-contribs '(slime-fancy))
```
3. Use `M-x slime` to fire up and connect to an inferior Lisp. SLIME will
......@@ -40,7 +40,7 @@ Contribs
--------
SLIME comes with additional contributed packages or "contribs".
Contribs can be loaded with the `slime-setup` function.
Contribs can be selected via the `slime-contribs` list.
The most-often used contrib is `slime-fancy`, which primarily installs a
popular set of other contributed packages. It includes a better REPL, and
......
......@@ -943,6 +943,7 @@ See `slime-lisp-implementations'")
(defun slime (&optional command coding-system)
"Start an inferior^_superior Lisp and connect to its Swank server."
(interactive)
(slime-setup)
(let ((inferior-lisp-program (or command inferior-lisp-program))
(slime-net-coding-system (or coding-system slime-net-coding-system)))
(slime-start* (cond ((and command (symbolp command))
......@@ -1061,6 +1062,7 @@ DIRECTORY change to this directory before starting the process.
"Port: " (cl-first slime-connect-port-history)
nil nil '(slime-connect-port-history . 1)))
nil t))
(slime-setup)
(when (and interactive-p
slime-net-processes
(y-or-n-p "Close old connections first? "))
......@@ -7492,8 +7494,6 @@ The returned bounds are either nil or non-empty."
(run-hooks 'slime-load-hook)
(provide 'slime)
(slime-setup)
;; Local Variables:
;; outline-regexp: ";;;;+"
;; indent-tabs-mode: nil
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment