-
-
Save jvillste/1207261 to your computer and use it in GitHub Desktop.
elisp for SLIME and swank-clojure
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
(defun clojure-reset-namespace () | |
"Reloads the current Clojure namespace by first removing it and | |
then re-evaluating the slime buffer. Use this to remove old | |
symbol definitions and reset the namespace to contain only what | |
is defined in your current Emacs buffer." | |
(interactive) | |
(save-buffer) | |
(slime-interactive-eval (concat "(remove-ns '" (slime-current-package) ")")) | |
(slime-compile-and-load-file)) | |
(defun clojure-switch-repl-to-current-namespace () | |
"Switch the REPL to the current clojure files namespace" | |
(interactive) | |
(slime-repl-send-string (concat "(ns " (slime-current-package) ")"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This clojure-reset-namespace version shows compiler errors better.