From d4040df41c1d7de825891fe3a414add317357e71 Mon Sep 17 00:00:00 2001 From: SANO Masatoshi Date: Sat, 24 Dec 2016 10:18:40 +0900 Subject: [PATCH] swank -> slime --- lisp/init.lisp | 5 ++--- lisp/install-slime.lisp | 2 +- lisp/locations.lisp | 3 +-- lisp/util-swank.lisp | 46 +++++++++++++++-------------------------- 4 files changed, 21 insertions(+), 35 deletions(-) diff --git a/lisp/init.lisp b/lisp/init.lisp index e5571bd..4041a7e 100644 --- a/lisp/init.lisp +++ b/lisp/init.lisp @@ -202,9 +202,8 @@ have the latest asdf, and this file has a workaround for this. (cl:load path))))))) (defun swank (&rest params) - (unless (cl:find-package :ros.swank.util) - (include "util-swank")) - (apply (read-from-string "ros.swank.util:swank") params)) + (include "util-swank") + (apply (read-from-string "roswell.util.swank:swank") params)) (defun shebang-reader (stream sub-character infix-parameter) (declare (ignore sub-character infix-parameter)) diff --git a/lisp/install-slime.lisp b/lisp/install-slime.lisp index a93fe95..8e8aab0 100644 --- a/lisp/install-slime.lisp +++ b/lisp/install-slime.lisp @@ -14,7 +14,7 @@ (defun slime-get-version () (format *error-output* "Checking version to install....~%") - (github-version (swank-git-version-uri) "slime" (lambda (href) (subseq href (+ 2 (position #\/ href :from-end t)))))) + (github-version (slime-git-version-uri) "slime" (lambda (href) (subseq href (+ 2 (position #\/ href :from-end t)))))) (defun name-error (name) (format *error-output* "~A is not appropriate format. ~% quicklisp dist for XXXX.XX.XX , slime version for X.XX.~%" name) diff --git a/lisp/locations.lisp b/lisp/locations.lisp index 74f65f2..c7e451e 100644 --- a/lisp/locations.lisp +++ b/lisp/locations.lisp @@ -38,12 +38,11 @@ (defuri asdf-git-version-uri "https://github.com/roswell/asdf/releases.atom") (defuri ecl-git-version-uri "https://github.com/roswell/ecl/releases.atom") (defuri sbcl-git-version-uri "https://github.com/sbcl/sbcl/releases.atom") -(defuri swank-git-version-uri"https://github.com/slime/slime/releases.atom") +(defuri slime-git-version-uri"https://github.com/slime/slime/releases.atom") (defuri asdf-uri "https://github.com/roswell/asdf/archive/") (defuri ecl-uri "https://github.com/roswell/ecl/archive/") (defuri sbcl-uri "https://github.com/sbcl/sbcl/archive/") -(defuri swank-uri "https://github.com/slime/slime/") (defuri sbcl-bin-version-uri) (defuri sbcl-bin-uri) diff --git a/lisp/util-swank.lisp b/lisp/util-swank.lisp index ad9777c..045f27c 100644 --- a/lisp/util-swank.lisp +++ b/lisp/util-swank.lisp @@ -1,36 +1,24 @@ -(cl:in-package :cl-user) -(when (cl:find-package :ros.swank.util) - (pushnew :ros.swank.util *features*)) - (ros:include "util") - -(defpackage :ros.swank.util +(defpackage :roswell.util.swank (:use :cl :ros.util) - (:export :swank :swank-write-version)) + (:export :swank)) +(in-package :roswell.util.swank) -(in-package :ros.swank.util) - -(defun swank-write-version (name) - (setf (config "swank.version") name)) - -(defun swank-read-version () - (config "swank.version")) - -(defun swank (&key port style (version (swank-read-version)) delete load-contribs dont-close) +(defun swank (&key port style (version (config "slime.version")) delete load-contribs dont-close) (when delete (ignore-errors (delete-package (find-package :swank-loader)))) - (load (merge-pathnames (format nil "lisp/swank/~A/swank-loader.lisp" version) (homedir))) - (funcall (read-from-string "swank-loader:init") - :delete delete - :load-contribs load-contribs) + (load (merge-pathnames (format nil "lisp/slime/~A/swank-loader.lisp" version) (homedir))) + (read-call "swank-loader:init" + :delete delete + :load-contribs load-contribs) (when port (if (boundp (read-from-string "swank::*coding-system*")) - (funcall (read-from-string "swank:create-server") - :port port - :style (or style (symbol-value (read-from-string "swank:*communication-style*"))) - :dont-close (or dont-close) - :coding ) - (funcall (read-from-string "swank:create-server") - :port port - :style (or style (symbol-value (read-from-string "swank:*communication-style*"))) - :dont-close (or dont-close))))) + (read-call "swank:create-server" + :port port + :style (or style (symbol-value (read-from-string "swank:*communication-style*"))) + :dont-close (or dont-close) + :coding) + (read-call "swank:create-server" + :port port + :style (or style (symbol-value (read-from-string "swank:*communication-style*"))) + :dont-close (or dont-close)))))