dot/lisp-init.lisp: Scatter the `export' declarations.
[profile] / dot / lisp-init.lisp
CommitLineData
152e7f69 1(cl:defpackage #:mdw-hacks
e623f041 2 (:use #:cl))
152e7f69
MW
3(cl:defparameter mdw-hacks::*previous-package* cl:*package*)
4(cl:in-package #:mdw-hacks)
d37d5787 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.
2c3abc4c 28#+(and unix (or sbcl clisp))
9af2290b
MW
29(let* ((homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
30 #+clisp (ext:getenv "HOME")
31 #+cmu (unix:unix-getenv "HOME")
32 "/home/mdw"))
33 (home (pathname (concatenate 'string homestring "/"))))
ae8efc86 34 (setf (logical-pathname-translations "HOME")
9af2290b 35 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" home nil)))
48152465
MW
36 (logical-pathname-translations "CL")
37 '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*")
38 ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*"))))
ae8efc86 39
62d12c1f
MW
40;; Various fixings.
41#+clisp (setf custom:*parse-namestring-ansi* t)
42
86c2d6fd
MW
43;; Shebang.
44(set-dispatch-macro-character
45 #\# #\!
9af2290b
MW
46 (lambda (stream char arg)
47 (declare (ignore char arg))
48 (values (read-line stream))))
86c2d6fd 49
d37d5787 50;; Start up swank.
e623f041 51(export 'crank-swank)
9af2290b
MW
52(defun crank-swank (&rest args)
53 (let ((swank (find-package "SWANK")))
54 (unless swank
d37d5787 55 (load "/usr/share/common-lisp/source/slime/swank-loader.lisp")
77619173 56 (funcall (find-symbol "INIT" (find-package "SWANK-LOADER")))
9af2290b
MW
57 (setf swank (find-package "SWANK")))
58 (set (find-symbol "*GLOBAL-DEBUGGER*" swank) nil)
59 (apply (find-symbol "CREATE-SERVER" swank) args)))
d37d5787 60
502738c0
MW
61#+asdf (setf asdf:*compile-file-failure-behaviour* :warn)
62
d37d5787 63;; Done.
6f7bbd84 64(pushnew :mdw *features*)
d37d5787 65;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops)
152e7f69 66(setf *package* *previous-package*)