Skip to content

Instantly share code, notes, and snippets.

@jkk
Created May 29, 2010 04:17
Show Gist options
  • Select an option

  • Save jkk/418036 to your computer and use it in GitHub Desktop.

Select an option

Save jkk/418036 to your computer and use it in GitHub Desktop.
(setq swank-clojure-init-files (list "/Users/tin/src/clj/user.clj"))
user> (def x 1)
#'user/x
user> x
1
user> (clear-ns)
user> x
; Unable to resolve symbol: x in this context
(defn clear-ns []
(let [n (ns-name *ns*) temp (gensym)]
(in-ns temp)
(clojure.core/remove-ns n)
(clojure.core/in-ns n)
(clojure.core/refer-clojure)
(remove-ns temp)
(load-file "/Users/tin/src/clj/user.clj")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment