Skip to content

Instantly share code, notes, and snippets.

@bixuanzju
Last active December 25, 2015 11:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixuanzju/6970466 to your computer and use it in GitHub Desktop.
Save bixuanzju/6970466 to your computer and use it in GitHub Desktop.
For Coursera
(defun isml ()
"If sml repl exists, then restart it else create a new repl."
(interactive)
(when (get-buffer "*sml*")
(with-current-buffer "*sml*"
(when (process-live-p "sml")
(comint-send-eof)))
(sleep-for 0.2))
(sml-run "sml" ""))
(defadvice sml-prog-proc-load-file
(before fresh-sml-repl-then-load-file activate compile)
"create a new repl before reload the file."
(isml))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment