chiark / gitweb /
dot/lisp-init.lisp: CMU CL already has a `search list' called `HOME'.
[profile] / dot / lisp-init.lisp
CommitLineData
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
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/**/*.*"))))))
31
ae8efc86 32#+sbcl (require :sb-posix)
cd93b434 33#+cmu (ext:clear-search-list "HOME")
d38ebd87 34#+(and unix (or sbcl cmu))
ae8efc86
MW
35(let ((#1=#:home (pathname (concatenate 'string
36 (or #+sbcl (sb-posix:getenv "HOME")
4eb29802 37 #+clisp (ext:getenv "HOME")
ae8efc86
MW
38 #+cmu (unix:unix-getenv "HOME")
39 "/home/mdw")
40 "/"))))
41 (setf (logical-pathname-translations "HOME")
42 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" #1#)))))
43
62d12c1f
MW
44;; Various fixings.
45#+clisp (setf custom:*parse-namestring-ansi* t)
46
86c2d6fd
MW
47;; Shebang.
48(set-dispatch-macro-character
49 #\# #\!
bedcbef0
MW
50 (lambda (#1=#:stream . #2=(#:char #:arg))
51 (declare (ignore . #2#))
52 (values (read-line #1#))))
86c2d6fd 53
d37d5787
MW
54;; Start up swank.
55(defun mdw-hacks:crank-swank (&rest #1=#:args)
56 (let ((#2=#:swank #3=(find-package "SWANK")))
57 (unless #2#
58 (load "/usr/share/common-lisp/source/slime/swank-loader.lisp")
59 (setf #2# #3#))
60 (set (find-symbol "*GLOBAL-DEBUGGER*" #2#) nil)
61 (apply (find-symbol "CREATE-SERVER" #2#) #1#)))
62
502738c0
MW
63#+asdf (setf asdf:*compile-file-failure-behaviour* :warn)
64
d37d5787 65;; Done.
6f7bbd84 66(pushnew :mdw *features*)
d37d5787 67;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops)