 (defn emitln [& xs]
   (apply emits xs)
   (println)
-  (swap! *cljs-gen-line* inc)
-  (reset! *cljs-gen-col* 0)
+  (when *cljs-gen-line*
+    (swap! *cljs-gen-line* inc))
+  (when *cljs-gen-col*
+    (reset! *cljs-gen-col* 0))
   nil)
 
 (defn ^String emit-str [expr]

        info (if (= (namespace var-name) "js")
               (name var-name)
               info)]
    (when (and (:line env) (symbol? var-name))
      (let [{:keys [line column]} env]
        (swap! *cljs-source-map*
          (fn [m]
            (let [minfo {:gcol  @*cljs-gen-col*
                         :gline @*cljs-gen-line*
                         :name  var-name}]
              (update-in m [line]
                (fnil (fn [m]
                        (update-in m [(or column 0)]
                          (fnil (fn [v] (conj v minfo)) [])))
                  (sorted-map))))))))
    (when-not (= :statement (:context env))
      (emit-wrap env (emits (munge info))))))


     (seq? x) (apply emits x)
     (fn? x)  (x)
     :else (let [s (print-str x)]
             (when *cljs-source-map*
               (swap! *cljs-gen-col* (fn [col] (+ col (count s)))))
             (print s))))
  nil)

