Last active
November 30, 2019 05:40
-
-
Save Drainful/9ac950253b0638721d413e44c3443b78 to your computer and use it in GitHub Desktop.
Code for sending common lisp sexps to Next
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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