sbcl.sbcl/loader.lisp
Stas Boukarev 1a9a1c8140 Change the name of the "abort building SBCL" restart.
To ABORT-BUILD, as there will be other ABORT restarts.
2019-01-30 17:51:01 +03:00

19 lines
731 B
Common Lisp

(defun load-sbcl-file (file &optional (exit t))
(labels ((exit-sbcl (code)
#+sbcl #.(if (eq :external
(nth-value 1 (find-symbol "EXIT" :sb-ext)))
`(,(find-symbol "EXIT" :sb-ext) :code code)
`(,(find-symbol "QUIT" :sb-ext) :unix-status code))
#+ccl (ccl:quit code)
#+abcl (ext:quit :status code)
#+cmucl (unix:unix-exit code)
#+ecl (si:quit code)
#+clisp (ext:quit code)
(return-from load-sbcl-file)))
(restart-case
(load file)
(abort-build ()
:report "Abort building SBCL."
(exit-sbcl 1)))
(when exit (exit-sbcl 0))))