[slime-devel] :init-function inconsistency
Helmut Eller
heller at common-lisp.net
Fri Mar 2 12:01:30 UTC 2012
* Pascal J. Bourguignon [2012-03-02 11:19] writes:
> In slime-start we have:
>
> (let ((args (list :program program :program-args program-args :buffer buffer
> :coding-system coding-system :init init :name name
> :init-function init-function :env env)))
>
> this args is passed to slime-inferior-connect and to
> slime-start-swank-server, but this function expects another keyword
> instead ofo :init-function:
>
> (defun slime-start-swank-server (process args)
> "Start a Swank server on the inferior lisp."
> (destructuring-bind (&key coding-system init &allow-other-keys) args
>
>
> This bug means that C-- M-x slime cannot use the :init-function
> specified for the CL implementation.
>
> So I propose to use:
>
> (defun slime-start-swank-server (process args)
> "Start a Swank server on the inferior lisp."
> (message "args=%S" args)
> (destructuring-bind (&key coding-system init-function &allow-other-keys) args
> (with-current-buffer (process-buffer process)
> (make-local-variable 'slime-inferior-lisp-args)
> (setq slime-inferior-lisp-args args)
> (let ((str (funcall init-function (slime-swank-port-file) coding-system)))
> (goto-char (process-mark process))
> (insert-before-markers str)
> (process-send-string process str)))))
>
> instead.
:init and :init-function have different purposes. Not great names, but
both seem to work with C-- M-x slime.
Helmut
More information about the slime-devel
mailing list