summaryrefslogtreecommitdiff
path: root/vim/bundle/slimv/swank-clojure/swank/clj_contrib/macroexpand.clj
blob: 8cb052b0442afa65310bb7d509857d79a75d267b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(ns swank.clj-contrib.macroexpand)

(def
 #^{:private true}
 walk-enabled?
 (.getResource (clojure.lang.RT/baseLoader) "clojure/contrib/macro_utils.clj"))

(when walk-enabled?
  (require 'clojure.contrib.macro-utils))

(defmacro macroexpand-all* [form]
  (if walk-enabled?
    `(clojure.contrib.macro-utils/mexpand-all ~form)
    `(macroexpand ~form)))

(defn macroexpand-all [form]
  (macroexpand-all* form))