forked from andreer/lispbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
write-site-init-lisp.sh
62 lines (51 loc) · 1.82 KB
/
write-site-init-lisp.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
cat <<EOF
(in-package :cl-user)
#+allegro
(progn
(setf excl::*redefinition-pathname-comparison-hook*
(list #'(lambda (old new obj type)
(declare (ignore obj type))
(when (and old new)
(string=
(namestring old)
(let ((str (namestring new)))
(subseq str 0 (position #\; str :from-end t))))))))
(tpl:setq-default *debugger-hook* #'swank:swank-debugger-hook)
(tpl:setq-default *print-length* 10)
(tpl:setq-default *print-level* 5)
(tpl:setq-default *print-circle* nil))
(setq *debugger-hook* #'swank:swank-debugger-hook)
(setf *print-length* 10)
(setf *print-level* 5)
(setf *print-circle* nil)
(setf swank::*swank-pprint-case* :downcase)
(setf swank::*swank-pprint-length* nil)
(setf swank::*swank-pprint-level* nil)
(setf swank::*swank-pprint-circle* nil)
(defun lispbox-file (relative-pathname)
(merge-pathnames
relative-pathname
(make-pathname
:directory (butlast (pathname-directory *load-pathname*))
:name nil
:type nil
:defaults *load-pathname*)))
(load (lispbox-file (make-pathname :directory '(:relative "quicklisp") :name "setup" :type "lisp")))
;#-asdf
;(progn
; (multiple-value-bind (value error)
; (ignore-errors (require :asdf))
; (if error
; (load (lispbox-file (make-pathname :name "asdf" :type "lisp"))))))
;(load (lispbox-file (make-pathname :name "asdf-extensions" :type "lisp")))
;;; Clean up CL-USER package
(loop with cl = (find-package :cl)
for p in (package-use-list :cl-user)
unless (eql p cl) do (unuse-package p :cl-user))
;(use-package :asdf :cl-user)
;(use-package :com.gigamonkeys.asdf-extensions :cl-user)
EOF
#cat <<EOF
#(register-source-directory (lispbox-file (make-pathname :directory '(:relative "${PRACTICALS}"))))
#EOF