dot/lisp-init.lisp: Place toplevel read-time conditionals on their own lines.
[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
MW
5
6;; Shut up.
f617db13
MW
7(setf *load-verbose* nil)
8(setf *compile-verbose* nil)
5927034b
MW
9
10#+cmu
11(setf *gc-verbose* nil)
d37d5787 12
297be13e
MW
13;; Obtain ASDF from somewhere.
14(require "asdf")
15
2498576b
MW
16;; Tell SBCL where to find its source source.
17#+sbcl
43ef52b8 18(sb-ext:set-sbcl-source-location #p"/usr/share/sbcl-source/")
2498576b 19
a2011397 20;; Tell some Lisps about my home directory.
2c3abc4c 21#+(and unix (or sbcl clisp))
9af2290b
MW
22(let* ((homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
23 #+clisp (ext:getenv "HOME")
24 #+cmu (unix:unix-getenv "HOME")
25 "/home/mdw"))
26 (home (pathname (concatenate 'string homestring "/"))))
ae8efc86 27 (setf (logical-pathname-translations "HOME")
9af2290b 28 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" home nil)))
48152465
MW
29 (logical-pathname-translations "CL")
30 '(("CL:SOURCE;**;*.*.*" #p"/usr/share/common-lisp/source/**/*.*")
31 ("CL:SYSTEMS;**;*.*.*" #p"/usr/share/common-lisp/systems/**/*.*"))))
ae8efc86 32
62d12c1f 33;; Various fixings.
5927034b
MW
34#+clisp
35(setf custom:*parse-namestring-ansi* t)
62d12c1f 36
86c2d6fd
MW
37;; Shebang.
38(set-dispatch-macro-character
39 #\# #\!
9af2290b
MW
40 (lambda (stream char arg)
41 (declare (ignore char arg))
42 (values (read-line stream))))
86c2d6fd 43
d37d5787 44;; Start up swank.
e623f041 45(export 'crank-swank)
9af2290b
MW
46(defun crank-swank (&rest args)
47 (let ((swank (find-package "SWANK")))
48 (unless swank
d37d5787 49 (load "/usr/share/common-lisp/source/slime/swank-loader.lisp")
77619173 50 (funcall (find-symbol "INIT" (find-package "SWANK-LOADER")))
9af2290b
MW
51 (setf swank (find-package "SWANK")))
52 (set (find-symbol "*GLOBAL-DEBUGGER*" swank) nil)
53 (apply (find-symbol "CREATE-SERVER" swank) args)))
d37d5787 54
5927034b
MW
55#+asdf
56(setf asdf:*compile-file-failure-behaviour* :warn)
502738c0 57
d37d5787 58;; Done.
6f7bbd84 59(pushnew :mdw *features*)
d37d5787 60;;#+(and cmu mp) (mp::startup-idle-and-top-level-loops)
152e7f69 61(setf *package* *previous-package*)