[slime-devel] slime-repl-set-package should not default the current package when calling slime-read-package-name
Marco Baringer
mb at bese.it
Mon Feb 4 16:36:53 UTC 2008
hi,
If you're going to change package it doesn't make sense to supply the
current package as the default argument, the first thing you're going
to do, and you're always going to do this, is delete the package name
slime just inserted.
(defun slime-repl-set-package (package)
"Set the package of the REPL buffer to PACKAGE."
(interactive (list (slime-read-package-name "Package: ")))
(with-current-buffer (slime-output-buffer)
(let ((unfinished-input (slime-repl-current-input)))
(destructuring-bind (name prompt-string)
(slime-eval `(swank:set-package ,package))
(setf (slime-lisp-package) name)
(setf (slime-lisp-package-prompt-string) prompt-string)
(slime-repl-insert-prompt)
(insert unfinished-input)))))
--
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the slime-devel
mailing list