|
105 | 105 | (use '[clojure.java.javadoc :only ~'[javadoc]])
|
106 | 106 | (use '[clojure.pprint :only ~'[pp pprint]])
|
107 | 107 |
|
108 |
| - ~(export-definition 'reply.initialization/help) |
109 |
| - |
110 |
| - (ns reply.exports) |
111 |
| - ~(export-definition 'reply.initialization/intern-with-meta) |
112 |
| - |
113 |
| - (binding [*err* (java.io.StringWriter.)] |
114 |
| - ~(export-definition 'reply.initialization/repl-defn) |
115 |
| - (~'intern-with-meta '~'user '~'defn ~'#'repl-defn)) |
116 |
| - |
117 |
| - ~(export-definition 'reply.initialization/sourcery) |
118 |
| - (~'intern-with-meta '~'user '~'sourcery ~'#'sourcery) |
119 |
| - |
120 |
| - ~(export-definition 'reply.initialization/clojuredocs-available?) |
121 |
| - ~(export-definition 'reply.initialization/call-with-ns-and-name) |
122 |
| - ~(export-definition 'reply.initialization/handle-fns-etc) |
123 |
| - ~(export-definition 'reply.initialization/lazy-clojuredocs) |
124 |
| - (~'intern-with-meta '~'user '~'clojuredocs ~'#'lazy-clojuredocs) |
125 |
| - (~'intern-with-meta '~'user '~'cdoc ~'#'lazy-clojuredocs) |
126 |
| - |
127 |
| - (try |
128 |
| - (require '[complete.core]) |
129 |
| - ; hack for 1.2 support until we release the next clojure-complete version |
130 |
| - ~(export-definition 'reply.initialization/resolve-class) |
131 |
| - (~'intern-with-meta '~'complete.core '~'resolve-class ~'#'resolve-class) |
132 |
| - |
133 |
| - (catch Exception e# |
134 |
| - (try |
135 |
| - (eval '~(formify-file |
136 |
| - (ClassLoader/getSystemResource "complete/core.clj"))) |
137 |
| - (catch Exception f# |
138 |
| - (intern (create-ns '~'complete.core) '~'completions |
139 |
| - (fn [prefix# ns#] [])) |
140 |
| - (println "Unable to initialize completions."))))) |
141 |
| - |
142 |
| - (in-ns '~'user) |
143 |
| - |
144 |
| - (~'help) |
| 108 | + (let [original-ns# ~'*ns*] |
| 109 | + (ns reply.exports) |
| 110 | + ~(export-definition 'reply.initialization/intern-with-meta) |
| 111 | + |
| 112 | + (binding [*err* (java.io.StringWriter.)] |
| 113 | + ~(export-definition 'reply.initialization/repl-defn) |
| 114 | + (~'intern-with-meta '~'user '~'defn ~'#'repl-defn)) |
| 115 | + |
| 116 | + ~(export-definition 'reply.initialization/help) |
| 117 | + (~'intern-with-meta '~'user '~'help ~'#'help) |
| 118 | + |
| 119 | + ~(export-definition 'reply.initialization/sourcery) |
| 120 | + (~'intern-with-meta '~'user '~'sourcery ~'#'sourcery) |
| 121 | + |
| 122 | + ~(export-definition 'reply.initialization/clojuredocs-available?) |
| 123 | + ~(export-definition 'reply.initialization/call-with-ns-and-name) |
| 124 | + ~(export-definition 'reply.initialization/handle-fns-etc) |
| 125 | + ~(export-definition 'reply.initialization/lazy-clojuredocs) |
| 126 | + (~'intern-with-meta '~'user '~'clojuredocs ~'#'lazy-clojuredocs) |
| 127 | + (~'intern-with-meta '~'user '~'cdoc ~'#'lazy-clojuredocs) |
| 128 | + |
| 129 | + (try |
| 130 | + (require '[complete.core]) |
| 131 | + ; hack for 1.2 support until we release the next clojure-complete version |
| 132 | + ~(export-definition 'reply.initialization/resolve-class) |
| 133 | + (~'intern-with-meta '~'complete.core '~'resolve-class ~'#'resolve-class) |
| 134 | + |
| 135 | + (catch Exception e# |
| 136 | + (try |
| 137 | + (eval '~(formify-file |
| 138 | + (ClassLoader/getSystemResource "complete/core.clj"))) |
| 139 | + (catch Exception f# |
| 140 | + (intern (create-ns '~'complete.core) '~'completions |
| 141 | + (fn [prefix# ns#] [])) |
| 142 | + (println "Unable to initialize completions."))))) |
| 143 | + |
| 144 | + (in-ns (ns-name original-ns#))) |
| 145 | + (~'user/help) |
145 | 146 | nil))
|
146 | 147 |
|
147 | 148 | (defn eval-in-user-ns [code]
|
|
0 commit comments