|
7 | 7 | ; You must not remove this notice, or any other, from this software. |
8 | 8 |
|
9 | 9 | (ns cljs.analyzer.macros |
10 | | - (:refer-clojure :exclude [binding]) |
11 | | - (:require [cljs.core :refer [binding]])) |
| 10 | + (:refer-clojure :exclude [binding])) |
12 | 11 |
|
13 | 12 | (defmacro with-warning-handlers [handlers & body] |
14 | | - `(binding [cljs.analyzer/*cljs-warning-handlers* ~handlers] |
| 13 | + `(cljs.core/binding [cljs.analyzer/*cljs-warning-handlers* ~handlers] |
15 | 14 | ~@body)) |
16 | 15 |
|
17 | 16 | (defmacro no-warn [& body] |
18 | | - `(binding [cljs.analyzer/*cljs-warnings* |
19 | | - (zipmap (keys cljs.analyzer/*cljs-warnings*) (repeat false))] |
| 17 | + `(cljs.core/binding [cljs.analyzer/*cljs-warnings* |
| 18 | + (zipmap (keys cljs.analyzer/*cljs-warnings*) (repeat false))] |
20 | 19 | ~@body)) |
21 | 20 |
|
22 | 21 | (defmacro with-core-macros |
23 | 22 | [path & body] |
24 | 23 | `(do |
25 | 24 | (when (not= cljs.analyzer/*cljs-macros-path* ~path) |
26 | 25 | (reset! cljs.analyzer/-cljs-macros-loaded false)) |
27 | | - (binding [cljs.analyzer/*cljs-macros-path* ~path] |
| 26 | + (cljs.core/binding [cljs.analyzer/*cljs-macros-path* ~path] |
28 | 27 | ~@body))) |
29 | 28 |
|
30 | 29 | (defmacro with-core-macros-file |
31 | 30 | [path & body] |
32 | 31 | `(do |
33 | 32 | (when (not= cljs.analyzer/*cljs-macros-path* ~path) |
34 | 33 | (reset! cljs.analyzer/-cljs-macros-loaded false)) |
35 | | - (binding [cljs.analyzer/*cljs-macros-path* ~path |
36 | | - cljs.analyzer/*cljs-macros-is-classpath* false] |
| 34 | + (cljs.core/binding [cljs.analyzer/*cljs-macros-path* ~path |
| 35 | + cljs.analyzer/*cljs-macros-is-classpath* false] |
37 | 36 | ~@body))) |
38 | 37 |
|
39 | 38 | (defmacro wrapping-errors [env & body] |
|
45 | 44 | (throw (cljs.analyzer/error ~env (.-message err#) err#)))))) |
46 | 45 |
|
47 | 46 | (defmacro disallowing-recur [& body] |
48 | | - `(binding [cljs.analyzer/*recur-frames* |
49 | | - (cons nil cljs.analyzer/*recur-frames*)] |
| 47 | + `(cljs.core/binding [cljs.analyzer/*recur-frames* |
| 48 | + (cons nil cljs.analyzer/*recur-frames*)] |
50 | 49 | ~@body)) |
51 | 50 |
|
52 | 51 | (defmacro allowing-redef [& body] |
53 | | - `(binding [cljs.analyzer/*allow-redef* true] |
| 52 | + `(cljs.core/binding [cljs.analyzer/*allow-redef* true] |
54 | 53 | ~@body)) |
55 | 54 |
|
56 | 55 | (defmacro disallowing-ns* [& body] |
57 | | - `(binding [cljs.analyzer/*allow-ns* false] ~@body)) |
| 56 | + `(cljs.core/binding [cljs.analyzer/*allow-ns* false] ~@body)) |
0 commit comments