         (when (and *cljs-warn-on-fn-var*
                    (not (-> sym meta :declared))
                    (and (:fn-var v) (not fn-var?)))
-          (binding [*out* *err*]
-            (println (str "WARNING: " (symbol (str ns-name) (str sym))
-                          " no longer fn, references are stale"
-                          (when (:line env)
-                            (str ", at line " (:line env) " " *cljs-file*)))))))
+          (warning env
+            (str "WARNING: " (symbol (str ns-name) (str sym))
+                 " no longer fn, references are stale"))))
       (swap! namespaces update-in [ns-name :defs sym]
              (fn [m]
                (let [m (assoc (or m {}) :name name)]

                      (get-in @namespaces [ns-name :uses sym]))
                (let [ev (resolve-existing-var (dissoc env :locals) sym)]
                  (when *cljs-warn-on-redef*
                    (binding [*out* *err*]
                      (println (str "WARNING: " sym " already refers to: " (symbol (str (:ns ev)) (str sym))
                                    " being replaced by: " (symbol (str ns-name) (str sym))
                                    (when (:line env)
                                      (str " at line " (:line env) " " *cljs-file*))))))
                  (swap! namespaces update-in [ns-name :excludes] conj sym)
                  (update-in env [:ns :excludes] conj sym))
                env)

    (let [crnt-ns (-> env :ns :name)]
      (when (= prefix crnt-ns)
        (when-not (-> @namespaces crnt-ns :defs suffix)
          (warning env
            (str "WARNING: Use of undeclared Var " prefix "/" suffix)))))))

(defn resolve-ns-alias [env name]
  (let [sym (symbol name)]
