1 (cl:defpackage #:mdw-hacks
3 (cl:defparameter mdw-hacks::*previous-package* cl:*package*)
4 (cl:in-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 (sb-ext:set-sbcl-source-location #p"/usr/share/sbcl-source/")
27 ;; Tell some Lisps about my home directory.
28 #+(and unix (or sbcl clisp))
29 (let* ((homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
30 #+clisp (ext:getenv "HOME")
31 #+cmu (unix:unix-getenv "HOME")
33 (home (pathname (concatenate 'string homestring "/"))))
34 (setf (logical-pathname-translations "HOME")
35 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" home nil)))
36 (logical-pathname-translations "CL")
37 '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*")
38 ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*"))))
41 #+clisp (setf custom:*parse-namestring-ansi* t)
44 (set-dispatch-macro-character
46 (lambda (stream char arg)
47 (declare (ignore char arg))
48 (values (read-line stream))))
52 (defun crank-swank (&rest args)
53 (let ((swank (find-package "SWANK")))
55 (load "/usr/share/common-lisp/source/slime/swank-loader.lisp")
56 (funcall (find-symbol "INIT" (find-package "SWANK-LOADER")))
57 (setf swank (find-package "SWANK")))
58 (set (find-symbol "*GLOBAL-DEBUGGER*" swank) nil)
59 (apply (find-symbol "CREATE-SERVER" swank) args)))
61 #+asdf (setf asdf:*compile-file-failure-behaviour* :warn)
64 (pushnew :mdw *features*)
65 ;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops)
66 (setf *package* *previous-package*)