Created
August 19, 2010 16:07
-
-
Save edgargoncalves/538243 to your computer and use it in GitHub Desktop.
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
;; Use of clojure-find-package suggested by Jürgen Hötzel | |
(defun slime-update-clojure-namespace (arg) | |
"Find the namespace in the current buffer and use SLIME's REPL | |
to switch to it, updating the namespace for all buffers. | |
Using an universal prefix will ask for the name of the namespace. | |
The actual namespace switch is done by calling `SLIME-REPL-SET-PACKAGE'." | |
(interactive "P") | |
(if arg | |
(call-interactively 'slime-repl-set-package) | |
(let ((ns (clojure-find-package))) ;; find the (in-ns ...) ns string | |
(if ns | |
(slime-repl-set-package ns) | |
;; no package found | |
(call-interactively 'slime-repl-set-package))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment