hi,
any reason slime-setup can't automatically add the contribs directory to emacs' load-path when requiring contribs? something like this:
(defun slime-setup (&optional contribs) "Setup Emacs so that lisp-mode buffers always use SLIME. CONTRIBS is a list of contrib packages to load." (when (member 'lisp-mode slime-lisp-modes) (add-hook 'lisp-mode-hook 'slime-lisp-mode-hook)) (when contribs (pushnew (file-name-as-directory (expand-file-name (concat slime-path "contribs")) load-path :test 'string=) (dolist (c contribs) (require c) (let ((init (intern (format "%s-init" c)))) (when (fboundp init) (funcall init)))))))
* Marco Baringer [2008-02-03 19:10+0100] writes:
hi,
any reason slime-setup can't automatically add the contribs directory to emacs' load-path when requiring contribs? something like this:
Modifying the load-path seems a bit rude, but if you can't resist, please also update slime-setup in slime-autoloads.el (and there it has to work without requiring 'cl).
Helmut.
Helmut Eller heller@common-lisp.net writes:
Modifying the load-path seems a bit rude, but if you can't resist, please also update slime-setup in slime-autoloads.el (and there it has to work without requiring 'cl).
i'd tend to agree, but can you think of any reason a user who wants to load contribs wouldn't also have to add that directory to their load-path?
i guess one could want to keep slime in one directory and the contribs in some other tree, but that doesn't like a very normal thing to do...
* Marco Baringer [2008-02-04 17:18+0100] writes:
Helmut Eller heller@common-lisp.net writes:
Modifying the load-path seems a bit rude, but if you can't resist, please also update slime-setup in slime-autoloads.el (and there it has to work without requiring 'cl).
i'd tend to agree, but can you think of any reason a user who wants to load contribs wouldn't also have to add that directory to their load-path?
i guess one could want to keep slime in one directory and the contribs in some other tree, but that doesn't like a very normal thing to do...
I actually have this in my .emacs: (slime-setup '(slime-local)) and slime-local.el is in a completely unrelated directory.
Helmut.