summaryrefslogtreecommitdiff
path: root/src/boot.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot.clj')
-rw-r--r--src/boot.clj14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/boot.clj b/src/boot.clj
index 208db231..a0bd71ae 100644
--- a/src/boot.clj
+++ b/src/boot.clj
@@ -1587,21 +1587,17 @@ not-every? (comp not every?))
"If form represents a macro form, returns its expansion,
else returns form."
[form]
- (let [v (and (seq? form) (. clojure.lang.Compiler (isMacro (first form))))]
- (if v
- (apply @v (rest form))
- form)))
+ (. clojure.lang.Compiler (macroexpand1 form)))
(defn macroexpand
"Repeatedly calls macroexpand-1 on form until it no longer
represents a macro form, then returns it. Note neither
macroexpand-1 nor macroexpand expand macros in subforms."
[form]
- (let [ex (macroexpand-1 form)
- v (and (seq? ex) (. clojure.lang.Compiler (isMacro (first ex))))]
- (if v
- (macroexpand ex)
- ex)))
+ (let [ex (macroexpand-1 form)]
+ (if (identical? ex form)
+ form
+ (macroexpand ex))))
(defn create-struct
"Returns a structure basis object."