aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Faulhaber <git_net@infolace.com>2009-12-11 00:07:33 -0800
committerTom Faulhaber <git_net@infolace.com>2009-12-11 00:07:33 -0800
commite5b7819ef66410a87b8072417dc2f09ac4ddb03f (patch)
tree2b5c6187133f4adeace1662d5cec6e574a3b5c2d
parenteb73c54687a9ed63dc939bbe886170f4a47455ed (diff)
Changed all instances of ^x across contrib to (meta x) since the ^x form is being deprecated in 1.1
refs #48
-rw-r--r--clojurescript/src/clojure/contrib/clojurescript.clj4
-rw-r--r--src/clojure/contrib/condition.clj6
-rw-r--r--src/clojure/contrib/error_kit.clj4
-rw-r--r--src/clojure/contrib/pprint/examples/show_doc.clj2
-rw-r--r--src/clojure/contrib/repl_utils.clj2
-rw-r--r--src/clojure/contrib/types.clj2
-rw-r--r--src/clojure/contrib/zip_filter.clj8
7 files changed, 14 insertions, 14 deletions
diff --git a/clojurescript/src/clojure/contrib/clojurescript.clj b/clojurescript/src/clojure/contrib/clojurescript.clj
index 1b8d696a..a9db6d7b 100644
--- a/clojurescript/src/clojure/contrib/clojurescript.clj
+++ b/clojurescript/src/clojure/contrib/clojurescript.clj
@@ -147,7 +147,7 @@
n)))
(defn- var-parts [e]
- (let [{:keys [name ns]} ^(.var e)]
+ (let [{:keys [name ns]} (meta (.var e))]
[(Compiler/munge (str (.getName ns))) (var-munge name)]))
(defmethod tojs clojure.lang.Compiler$UnresolvedVarExpr [e ctx]
@@ -318,7 +318,7 @@
(eval f)
nil)
(when-not (or (and (instance? Compiler$DefExpr mainexpr)
- (skip-def (:name ^(.var mainexpr))))
+ (skip-def (:name (meta (.var mainexpr)))))
(and (instance? Compiler$InstanceMethodExpr mainexpr)
(or (= "setMacro" (.methodName mainexpr))
(and (= "addMethod" (.methodName mainexpr))
diff --git a/src/clojure/contrib/condition.clj b/src/clojure/contrib/condition.clj
index 8df8acff..98aa589a 100644
--- a/src/clojure/contrib/condition.clj
+++ b/src/clojure/contrib/condition.clj
@@ -94,8 +94,8 @@ http://groups.google.com/group/clojure/browse_frm/thread/da1285c538f22bb5"}
~@code
(catch Condition c#
(binding [*condition-object* c#
- *condition* ^c#
- *selector* (~dispatch-fn ^c#)]
+ *condition* (meta c#)
+ *selector* (~dispatch-fn (meta c#))]
(cond
~@(mapcat
(fn [[_ key & body]]
@@ -117,7 +117,7 @@ http://groups.google.com/group/clojure/browse_frm/thread/da1285c538f22bb5"}
(defmethod stack-trace-info Condition
[condition]
- (stack-trace-info ^condition))
+ (stack-trace-info (meta condition)))
(defmethod stack-trace-info Throwable
[throwable]
diff --git a/src/clojure/contrib/error_kit.clj b/src/clojure/contrib/error_kit.clj
index 4db80d59..93ebddd4 100644
--- a/src/clojure/contrib/error_kit.clj
+++ b/src/clojure/contrib/error_kit.clj
@@ -54,7 +54,7 @@ or API adjustments."}
(defn- qualify-sym [sym]
(let [v (resolve sym)]
(assert v)
- (apply symbol (map #(str (% ^v)) [:ns :name]))))
+ (apply symbol (map #(str (% (meta v))) [:ns :name]))))
(defmacro deferror
"Define a new error type"
@@ -110,7 +110,7 @@ or API adjustments."}
(defmacro raise
"Raise an error of the type err-name, constructed with the given args"
[err-name & args]
- `(raise* (~err-name ~(zipmap (::args ^(resolve err-name))
+ `(raise* (~err-name ~(zipmap (::args (meta (resolve err-name)))
args))))
; It'd be nice to assert that these are used in a tail position of a handler
diff --git a/src/clojure/contrib/pprint/examples/show_doc.clj b/src/clojure/contrib/pprint/examples/show_doc.clj
index 77c73a24..6bf61585 100644
--- a/src/clojure/contrib/pprint/examples/show_doc.clj
+++ b/src/clojure/contrib/pprint/examples/show_doc.clj
@@ -37,7 +37,7 @@
#(vector (ns-name %)
(map
(fn [f]
- (let [f-meta ^(find-var (symbol (str (ns-name %)) (str f)))]
+ (let [f-meta (meta (find-var (symbol (str (ns-name %)) (str f))))]
[f (:arglists f-meta) (:doc f-meta)]))
(filter
(fn [a] (instance? clojure.lang.IFn a))
diff --git a/src/clojure/contrib/repl_utils.clj b/src/clojure/contrib/repl_utils.clj
index 2864179b..30c483ca 100644
--- a/src/clojure/contrib/repl_utils.clj
+++ b/src/clojure/contrib/repl_utils.clj
@@ -107,7 +107,7 @@
(when-let [filepath (:file (meta v))]
(when-let [strm (.getResourceAsStream (RT/baseLoader) filepath)]
(with-open [rdr (LineNumberReader. (InputStreamReader. strm))]
- (dotimes [_ (dec (:line ^v))] (.readLine rdr))
+ (dotimes [_ (dec (:line (meta v)))] (.readLine rdr))
(let [text (StringBuilder.)
pbr (proxy [PushbackReader] [rdr]
(read [] (let [i (proxy-super read)]
diff --git a/src/clojure/contrib/types.clj b/src/clojure/contrib/types.clj
index 00bd220d..f0b85267 100644
--- a/src/clojure/contrib/types.clj
+++ b/src/clojure/contrib/types.clj
@@ -49,7 +49,7 @@
(defmethod constructor-form :default
[o] nil)
(defmethod constructor-form ::type
- [o] (cons (::constructor ^o) (deconstruct o)))
+ [o] (cons (::constructor (meta o)) (deconstruct o)))
(defmacro deftype
"Define a data type by a type tag (a namespace-qualified keyword)
diff --git a/src/clojure/contrib/zip_filter.clj b/src/clojure/contrib/zip_filter.clj
index 0621d655..c7599bf8 100644
--- a/src/clojure/contrib/zip_filter.clj
+++ b/src/clojure/contrib/zip_filter.clj
@@ -21,10 +21,10 @@ general, and xml trees in particular.
; This uses the negative form (no-auto) so that the result from any
; naive function, including user functions, defaults to "auto".
(defn auto
- [v x] (with-meta x ((if v dissoc assoc) ^x :zip-filter/no-auto? true)))
+ [v x] (with-meta x ((if v dissoc assoc) (meta x) :zip-filter/no-auto? true)))
(defn auto?
- [x] (not (:zip-filter/no-auto? ^x)))
+ [x] (not (:zip-filter/no-auto? (meta x))))
(defn right-locs
"Returns a lazy sequence of locations to the right of loc, starting with loc."
@@ -74,7 +74,7 @@ general, and xml trees in particular.
#^{:private true}
[pred loc]
(let [rtn (pred loc)]
- (cond (and (map? ^rtn) (:zip-filter/is-node? ^rtn)) (list rtn)
+ (cond (and (map? (meta rtn)) (:zip-filter/is-node? (meta rtn))) (list rtn)
(= rtn true) (list loc)
(= rtn false) nil
(nil? rtn) nil
@@ -86,7 +86,7 @@ general, and xml trees in particular.
[loc preds mkpred]
(reduce (fn [prevseq expr]
(mapcat #(fixup-apply (or (mkpred expr) expr) %) prevseq))
- (list (with-meta loc (assoc ^loc :zip-filter/is-node? true)))
+ (list (with-meta loc (assoc (meta loc) :zip-filter/is-node? true)))
preds))
; see clojure.contrib.zip-filter.xml for examples