Skip to content

Instantly share code, notes, and snippets.

@Drainful
Last active November 30, 2019 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Drainful/9ac950253b0638721d413e44c3443b78 to your computer and use it in GitHub Desktop.
Save Drainful/9ac950253b0638721d413e44c3443b78 to your computer and use it in GitHub Desktop.
Code for sending common lisp sexps to Next
(require 'slime)
(defvar next-browser-connection nil)
(defun get-next-browser-connection ()
(if (and next-browser-connection
(find next-browser-connection slime-net-processes))
next-browser-connection
(aif (ignore-errors
(slime-net-connect "localhost"
"4006"))
(setq next-browser-connection it))))
(defun next-browser-eval (sexp)
(aif (get-next-browser-connection)
(let ((slime-dispatching-connection it))
(slime-eval sexp))
(error "Next browser has not been started.")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment