Commit | Line | Data |
---|---|---|
d37d5787 MW |
1 | (defpackage #:mdw-hacks |
2 | (:use #:cl) | |
3 | (:export #:crank-swank)) | |
4 | (use-package '#:mdw-hacks) | |
5 | ||
8114097d MW |
6 | ;; Obtain ASDF from somewhere. |
7 | #+sbcl (require :asdf) | |
8 | #+clisp (let ((*compile-verbose* nil) | |
9 | (*load-verbose* nil)) | |
8114097d MW |
10 | (handler-bind ((warning (lambda (cond) |
11 | (declare (ignore cond)) | |
12 | (muffle-warning)))) | |
caac02f8 MW |
13 | (load "/usr/share/common-lisp/source/cl-asdf/asdf.lisp" |
14 | :verbose nil) | |
8114097d MW |
15 | (funcall (find-symbol "LOAD-SYSTEM" :asdf) :asdf |
16 | :verbose nil))) | |
17 | ||
d37d5787 | 18 | ;; Shut up. |
f617db13 MW |
19 | (setf *load-verbose* nil) |
20 | (setf *compile-verbose* nil) | |
21 | #+cmu (setf *gc-verbose* nil) | |
d37d5787 | 22 | |
2498576b MW |
23 | ;; Tell SBCL where to find its source source. |
24 | #+sbcl | |
43ef52b8 | 25 | (sb-ext:set-sbcl-source-location #p"/usr/share/sbcl-source/") |
2498576b | 26 | |
a2011397 | 27 | ;; Tell some Lisps about my home directory. |
cd93b434 | 28 | #+cmu (ext:clear-search-list "HOME") |
c4e34468 | 29 | #+(and unix (or sbcl clisp cmu)) |
266c56a3 | 30 | (let* ((#1=#:homestring (or #+sbcl (sb-ext:posix-getenv "HOME") |
dab00e44 MW |
31 | #+clisp (ext:getenv "HOME") |
32 | #+cmu (unix:unix-getenv "HOME") | |
33 | "/home/mdw")) | |
34 | (#2=#:home (pathname (concatenate 'string #1# "/")))) | |
ae8efc86 | 35 | (setf (logical-pathname-translations "HOME") |
dab00e44 | 36 | `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" #2# nil))) |
48152465 MW |
37 | (logical-pathname-translations "CL") |
38 | '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*") | |
39 | ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*")))) | |
ae8efc86 | 40 | |
62d12c1f MW |
41 | ;; Various fixings. |
42 | #+clisp (setf custom:*parse-namestring-ansi* t) | |
43 | ||
86c2d6fd MW |
44 | ;; Shebang. |
45 | (set-dispatch-macro-character | |
46 | #\# #\! | |
bedcbef0 MW |
47 | (lambda (#1=#:stream . #2=(#:char #:arg)) |
48 | (declare (ignore . #2#)) | |
49 | (values (read-line #1#)))) | |
86c2d6fd | 50 | |
d37d5787 MW |
51 | ;; Start up swank. |
52 | (defun mdw-hacks:crank-swank (&rest #1=#:args) | |
53 | (let ((#2=#:swank #3=(find-package "SWANK"))) | |
54 | (unless #2# | |
55 | (load "/usr/share/common-lisp/source/slime/swank-loader.lisp") | |
56 | (setf #2# #3#)) | |
57 | (set (find-symbol "*GLOBAL-DEBUGGER*" #2#) nil) | |
58 | (apply (find-symbol "CREATE-SERVER" #2#) #1#))) | |
59 | ||
502738c0 MW |
60 | #+asdf (setf asdf:*compile-file-failure-behaviour* :warn) |
61 | ||
d37d5787 | 62 | ;; Done. |
6f7bbd84 | 63 | (pushnew :mdw *features*) |
d37d5787 | 64 | ;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops) |