[slime-devel] New command for starting and loading

Helmut Eller e9626484 at stud3.tuwien.ac.at
Sun May 2 19:14:43 UTC 2004


Lars Magne Ingebrigtsen <larsi at gnus.org> writes:

> + (defun slime-start-and-load ()
> +   "Start Slime, load the current file and set the package."
> +   (interactive)
> +   (let ((package (slime-find-buffer-package)))
> +     (if (not package)
> +         (error "No package to load")
> +       (slime)
> +       (while (not (slime-connected-p))
> +         (sit-for 0.1))
> +       (slime-repl-send-string
> +        (format "(progn (load \"%s\") (in-package %s))\n" package package)))))
> + 

I committed a patch that loads the current file, not the package.  Is
that OK?

By convention we don't send snippets of CL code to lisp, especially
not encoded as strings (problematic with non-standard reader syntax).
The preferred way is to use slime-eval-async or slime-eval and write
the function in CL directly.

Helmut.




More information about the slime-devel mailing list