[slime-devel] :init-function inconsistency

Pascal J. Bourguignon pjb at informatimago.com
Fri Mar 2 13:09:57 UTC 2012


Helmut Eller <heller at common-lisp.net> writes:

> * 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.

Yes, I didn't notice there were two parameter at once.    I need to use
:init, not :init-function.
Thanks.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.





More information about the slime-devel mailing list