diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-04-02 17:14:03 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-04-02 17:14:03 +0000 |
commit | 1378182f7f808dc8f0b002abfbead17c2884d1a1 (patch) | |
tree | f036c655b2eaac865b1ab3f77d958a731c669041 | |
parent | 5cafae0d97585d06fc2508baa524c0e82ab2179c (diff) |
fixed macroexpand of non-seqs
-rw-r--r-- | src/boot.clj | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/boot.clj b/src/boot.clj index 17a09c72..208db231 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -1587,7 +1587,7 @@ not-every? (comp not every?)) "If form represents a macro form, returns its expansion, else returns form." [form] - (let [v (. clojure.lang.Compiler (isMacro (first form)))] + (let [v (and (seq? form) (. clojure.lang.Compiler (isMacro (first form))))] (if v (apply @v (rest form)) form))) @@ -1598,7 +1598,7 @@ not-every? (comp not every?)) macroexpand-1 nor macroexpand expand macros in subforms." [form] (let [ex (macroexpand-1 form) - v (. clojure.lang.Compiler (isMacro (first ex)))] + v (and (seq? ex) (. clojure.lang.Compiler (isMacro (first ex))))] (if v (macroexpand ex) ex))) |