[slime-devel] Re: SLIME docs

Christian Lynbech christian at defun.dk
Mon Sep 27 04:44:06 UTC 2004


>>>>> "Dan" == Dan Pierson <dlp at itasoftware.com> writes:

Dan> Christian Lynbech wrote:
>> I wondered if the docs should mention usefull hacks to set up
>> functions to start slime with specialised lisp binaries/arguments (for
>> instance a special core image).

Dan> I used to use something like these and rather miss them.  The problem
Dan> is that I find ,restart-inferior-lisp too useful to give up and it
Dan> ignores all of this.  Any suggestions for how to fix that?

I didn't know about `restart-inferior-lisp' but having pondered the
issue a bit, it seems to me that solution is simply to reset
`inferior-lisp-program' whenever starting up slime.

Here is a very simple and naive emacs macro

    (defmacro define-slime-dialect (name &optional program hook)
      (let ((funsym (intern (format "slime-dialect-%s" name)))
	    (hooksym (intern (format "slime-dialect-%s-hook" name)))
	    (progsym (intern (format "slime-dialect-%s-program" name))))
      `(progn
	(defvar ,progsym ,program)
	(defvar ,hooksym ,hook)
	(defun ,funsym ()
	  ,(format "Start up slime according to `%s'." progsym)
	  (interactive)
	  (setq inferior-lisp-program ,progsym)
	  (run-hook ',hooksym)
	  (call-interactively 'slime)))))

that allows you to define dialects like this:

    (define-slime-dialect lisp "lisp")

    (define-slime-dialect clim
	(concat "lisp" " -core " (getenv "HOME") 
		"/Public/cmucl/cmucl-clim.core")
	(lambda () (setq slime-multiprocessing t)))

    (define-slime-dialect mlisp
        (concat "/usr/lib/acl/mlisp +B +cm -L " (getenv "HOME") "/.slime.lisp")
        (lambda () (when prefix-arg (setq slime-multiprocessing t))))


This will make the slime command behave as a clim slime until another
dialect has been selected, but this is what we want, I think.


------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic at hal.com (Michael A. Petonic)





More information about the slime-devel mailing list