Merge branch 'main' of git.sr.ht:~marcuskammer/emacs.d
This commit is contained in:
commit
40c484c622
1 changed files with 27 additions and 0 deletions
27
babel.lisp
27
babel.lisp
|
@ -2,5 +2,32 @@
|
|||
;;;; Author: Marcus Kammer <marcus.kammer@metalisp.dev>
|
||||
;;;; MIT License
|
||||
|
||||
;; Put the following lines into your .sbclrc:
|
||||
;;
|
||||
;; (let ((babel (merge-pathnames ".emacs.d/babel.lisp" (user-homedir-pathname))))
|
||||
;; (when (probe-file babel)
|
||||
;; (load babel)))
|
||||
|
||||
;;; --- snip ---
|
||||
(defun print-condition-hook (condition hook)
|
||||
"This function is designed to be used as a custom debugger hook.
|
||||
It prints the condition (error message), clears any remaining input,
|
||||
and aborts the current operation."
|
||||
;; Ignore the hook argument since it's not used in this function.
|
||||
(declare (ignore hook))
|
||||
;; Print the error message associated with the condition.
|
||||
(princ condition)
|
||||
;; Clear any pending input from the stream.
|
||||
(clear-input)
|
||||
;; Abort the current operation and return to the top-level.
|
||||
(abort))
|
||||
;; Get the value of the global variable *debugger-hook*.
|
||||
*debugger-hook*
|
||||
;; Set the global variable *debugger-hook* to the custom debugger hook
|
||||
;; function 'print-condition-hook'. This function will now be called
|
||||
;; whenever an unhandled error occurs.
|
||||
(setf *debugger-hook* #'print-condition-hook)
|
||||
(sb-ext:set-sbcl-source-location #P"~/sbcl/")
|
||||
|
||||
(when (probe-file "~/quicklisp/local-projects/dev.metalisp.sbt")
|
||||
(ql:quickload :dev.metalisp.sbt))
|
||||
|
|
Loading…
Add table
Reference in a new issue