1 (defpackage #:mdw-hacks
3 (:export #:crank-swank))
4 (use-package '#:mdw-hacks)
6 ;; Obtain ASDF from somewhere.
8 #+clisp (let ((*compile-verbose* nil)
10 (handler-bind ((warning (lambda (cond)
11 (declare (ignore cond))
13 (load "/usr/share/common-lisp/source/cl-asdf/asdf.lisp"
15 (funcall (find-symbol "LOAD-SYSTEM" :asdf) :asdf
19 (setf *load-verbose* nil)
20 (setf *compile-verbose* nil)
21 #+cmu (setf *gc-verbose* nil)
23 ;; Tell SBCL where to find its source source.
25 (let ((#1=#:sbcl-src #p"/usr/share/sbcl-source/"))
26 (flet ((#2=#:sbcl-dir (#3=#:p)
27 (merge-pathnames #3# #1#)))
28 (setf (logical-pathname-translations "SYS")
29 `(("SYS:SRC;**;*.*.*" ,(#2# "src/**/*.*"))
30 ("SYS:CONTRIB;**;*.*.*" ,(#2# "contrib/**/*.*"))))))
32 ;; Tell some Lisps about my home directory.
33 #+cmu (ext:clear-search-list "HOME")
34 #+(and unix (or sbcl clisp cmu))
35 (let* ((#1=#:homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
36 #+clisp (ext:getenv "HOME")
37 #+cmu (unix:unix-getenv "HOME")
39 (#2=#:home (pathname (concatenate 'string #1# "/"))))
40 (setf (logical-pathname-translations "HOME")
41 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" #2# nil)))
42 (logical-pathname-translations "CL")
43 '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*")
44 ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*"))))
47 #+clisp (setf custom:*parse-namestring-ansi* t)
50 (set-dispatch-macro-character
52 (lambda (#1=#:stream . #2=(#:char #:arg))
53 (declare (ignore . #2#))
54 (values (read-line #1#))))
57 (defun mdw-hacks:crank-swank (&rest #1=#:args)
58 (let ((#2=#:swank #3=(find-package "SWANK")))
60 (load "/usr/share/common-lisp/source/slime/swank-loader.lisp")
62 (set (find-symbol "*GLOBAL-DEBUGGER*" #2#) nil)
63 (apply (find-symbol "CREATE-SERVER" #2#) #1#)))
65 #+asdf (setf asdf:*compile-file-failure-behaviour* :warn)
68 (pushnew :mdw *features*)
69 ;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops)