Skip to content

Instantly share code, notes, and snippets.

@cbaggers
Created January 27, 2016 18:10
Show Gist options
  • Save cbaggers/64b79395c26b01998127 to your computer and use it in GitHub Desktop.
Save cbaggers/64b79395c26b01998127 to your computer and use it in GitHub Desktop.
update-swank
(defun update-swank ()
"Called from within the main loop, this keep the lisp repl
working while cepl runs"
(continuable
(let ((connection (or swank::*emacs-connection*
(swank::default-connection))))
(when connection
(swank::handle-requests connection t)))))
(defmacro continuable (&body body)
"Helper macro that we can use to allow us to continue from an
error. Remember to hit C in slime or pick the restart so
errors don't kill the app."
`(restart-case
(progn ,@body)
(continue () :report "CEPL Continue")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment