The basic SLIME recipe in the toplevel README goes:
(add-to-list 'load-path "~/hacking/lisp/slime/") (setq inferior-lisp-program "/opt/sbcl/bin/sbcl") (require 'slime) (slime-setup)
but this will trip up anybody who tries to use the contrib modules via installing functions in SLIME-LOAD-HOOK, as it will never get called when M-x slime is invoked, at least on Emacs 22.
Using this
(add-to-list 'load-path "~/hacking/lisp/slime/") (setq inferior-lisp-program "/opt/sbcl/bin/sbcl") (autoload 'slime-setup "slime.el") (slime-setup)
seems to actually get SLIME-LOAD-HOOK called.
Maybe the quick setup instructions should be changed?
Mark Evenson mark.evenson@gmx.at writes:
The basic SLIME recipe in the toplevel README goes:
(add-to-list 'load-path "~/hacking/lisp/slime/") (setq inferior-lisp-program "/opt/sbcl/bin/sbcl") (require 'slime) (slime-setup)
but this will trip up anybody who tries to use the contrib modules via installing functions in SLIME-LOAD-HOOK, as it will never get called when M-x slime is invoked, at least on Emacs 22.
You have to set up the `slime-load-hook' before you require SLIME.
-T.
On Fri, Sep 14, 2007 at 11:24:08AM +0200, Tobias C. Rittweiler wrote: : Mark Evenson mark.evenson@gmx.at writes: : : > The basic SLIME recipe in the toplevel README goes: : > : > (add-to-list 'load-path "~/hacking/lisp/slime/") : > (setq inferior-lisp-program "/opt/sbcl/bin/sbcl") : > (require 'slime) : > (slime-setup) : > : > but this will trip up anybody who tries to use the contrib modules via : > installing functions in SLIME-LOAD-HOOK, as it will never get called : > when M-x slime is invoked, at least on Emacs 22. : : You have to set up the `slime-load-hook' before you require SLIME.
Really? Mine seems to work okay defining both slime-load-hook and slime-mode-hook AFTER (require 'slime-autoloads) and (slime-setup).
Jonathon McKitrick -- My other computer is your Windows box.
Jonathon McKitrick jcm@sdf.lonestar.org writes:
: You have to set up the `slime-load-hook' before you require SLIME.
Really? Mine seems to work okay defining both slime-load-hook and slime-mode-hook AFTER (require 'slime-autoloads) and (slime-setup).
It's a different story for slime-autoloads, as this one loads the crucial part of slime on-demand---whereas (require 'slime) would load all of Slime at once into Emacs.
-T.
* Mark Evenson [2007-09-14 10:14+0200] writes:
Maybe the quick setup instructions should be changed?
The quick setup instructions should primarily be short and save. Loading contribs needs more work and isn't needed to get a first impression.
However, we could change slime-setup so that it takes a list of contribs to load, because there seems to be some confusion when slime-load-hook is called.
Helmut.
Helmut Eller heller@common-lisp.net writes:
However, we could change slime-setup so that it takes a list of contribs to load, because there seems to be some confusion when slime-load-hook is called.
I think that sounds like a good idea.
Maybe we should also warn within the contribs if they're loaded at inappropriate time.
-T.
* Tobias C. Rittweiler [2007-09-14 19:04+0200] writes:
Helmut Eller heller@common-lisp.net writes:
However, we could change slime-setup so that it takes a list of contribs to load, because there seems to be some confusion when slime-load-hook is called.
I think that sounds like a good idea.
I changed slime-setup and now the following should also load the contribs:
(require 'slime) (slime-setup '(slime-autodoc slime-typeout-frame))
Helmut.
Helmut Eller heller@common-lisp.net writes:
I changed slime-setup and now the following should also load the contribs:
(require 'slime) (slime-setup '(slime-autodoc slime-typeout-frame))
What is about the keyargs it previously took?
-T.
"Tobias C. Rittweiler" tcr@freebits.de writes:
Helmut Eller heller@common-lisp.net writes:
(require 'slime) (slime-setup '(slime-autodoc slime-typeout-frame))
What is about the keyargs it previously took?
Ah! I think the new policy is that requiring a contrib, also means that its functionality should automatically be enabled, right?
From that perspective, the keyargs aren't needed anymore. But could we
let `slime-setup' take an &rest argument, and check if any of the previous key args was passed, and if so, die gracefully?
-T.
* Tobias C. Rittweiler [2007-09-15 18:11+0200] writes:
Ah! I think the new policy is that requiring a contrib, also means that its functionality should automatically be enabled, right?
Well, no. It's to early for a policy. Enabling the functionality immediately is convenient sometimes, but it's not required.
From that perspective, the keyargs aren't needed anymore. But could we
let `slime-setup' take an &rest argument, and check if any of the previous key args was passed, and if so, die gracefully?
We could, but this kind of extra work would be obsolete in two weeks anyway.
Helmut.
Helmut Eller heller@common-lisp.net writes:
From that perspective, the keyargs aren't needed anymore. But could we let `slime-setup' take an &rest argument, and check if any of the previous key args was passed, and if so, die gracefully?
We could, but this kind of extra work would be obsolete in two weeks anyway.
HEAD breaks every second ~/.emacs resulting in a more or less obscure error. I think some guidance is appropriate.
Most people update Slime only every 3 months, others even less frequently, so I wouldn't say that it'll be obsolete in two weeks.
-T.