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