dot/lisp-init.lisp: Use actual variable names rather than gensyms.
[profile] / dot / lisp-init.lisp
CommitLineData
152e7f69 1(cl:defpackage #:mdw-hacks
d37d5787
MW
2 (:use #:cl)
3 (:export #:crank-swank))
152e7f69
MW
4(cl:defparameter mdw-hacks::*previous-package* cl:*package*)
5(cl:in-package #:mdw-hacks)
d37d5787 6
8114097d
MW
7;; Obtain ASDF from somewhere.
8#+sbcl (require :asdf)
9#+clisp (let ((*compile-verbose* nil)
10 (*load-verbose* nil))
8114097d
MW
11 (handler-bind ((warning (lambda (cond)
12 (declare (ignore cond))
13 (muffle-warning))))
caac02f8
MW
14 (load "/usr/share/common-lisp/source/cl-asdf/asdf.lisp"
15 :verbose nil)
8114097d
MW
16 (funcall (find-symbol "LOAD-SYSTEM" :asdf) :asdf
17 :verbose nil)))
18
d37d5787 19;; Shut up.
f617db13
MW
20(setf *load-verbose* nil)
21(setf *compile-verbose* nil)
22#+cmu (setf *gc-verbose* nil)
d37d5787 23
2498576b
MW
24;; Tell SBCL where to find its source source.
25#+sbcl
43ef52b8 26(sb-ext:set-sbcl-source-location #p"/usr/share/sbcl-source/")
2498576b 27
a2011397 28;; Tell some Lisps about my home directory.
2c3abc4c 29#+(and unix (or sbcl clisp))
9af2290b
MW
30(let* ((homestring (or #+sbcl (sb-ext:posix-getenv "HOME")
31 #+clisp (ext:getenv "HOME")
32 #+cmu (unix:unix-getenv "HOME")
33 "/home/mdw"))
34 (home (pathname (concatenate 'string homestring "/"))))
ae8efc86 35 (setf (logical-pathname-translations "HOME")
9af2290b 36 `(("HOME:**;*.*.*" ,(merge-pathnames "**/*.*" home 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 #\# #\!
9af2290b
MW
47 (lambda (stream char arg)
48 (declare (ignore char arg))
49 (values (read-line stream))))
86c2d6fd 50
d37d5787 51;; Start up 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")
9af2290b
MW
56 (setf swank (find-package "SWANK")))
57 (set (find-symbol "*GLOBAL-DEBUGGER*" swank) nil)
58 (apply (find-symbol "CREATE-SERVER" swank) args)))
d37d5787 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)
152e7f69 65(setf *package* *previous-package*)