Skip to content

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
(require 'pc-select)
(defun slime-update-clojure-namespace ()
"Find the namespace in the current buffer and use SLIME's REPL
to switch to it, updating the namespace for all buffers."
;; search for this buffer's namespace:
(goto-char 0)
(when (search-forward "(ns " nil t)
(let ((beg (point))
(end (save-excursion
(forward-sexp 1)
(copy-region-as-kill-nomark beg end))
;; send the in-ns command to slime's repl:
(set-buffer (slime-output-buffer))
(unless (eq (current-buffer) (window-buffer))
(pop-to-buffer (current-buffer) t))
(goto-char (point-max))
(insert "(in-ns '")
(insert ")")
(other-window 1)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.