Skip to content

Instantly share code, notes, and snippets.

@RickMoynihan
Created June 4, 2010 09:03
Show Gist options
  • Save RickMoynihan/425181 to your computer and use it in GitHub Desktop.
Save RickMoynihan/425181 to your computer and use it in GitHub Desktop.
elisp for SLIME and swank-clojure
(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)
(slime-interactive-eval (concat "(remove-ns '" (slime-current-package) ")"))
(slime-eval-buffer))
(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) ")")))
@RickMoynihan
Copy link
Author

Some handy elisp functions I wrote extending slime/swank-clojure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment