[slime-devel] :init-function inconsistency

Pascal J. Bourguignon pjb at informatimago.com
Fri Mar 2 11:19:46 UTC 2012



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.

-- 
__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