From f7e87a5bf521823bff0301b2882fbd3f803e47e6 Mon Sep 17 00:00:00 2001 From: davidnolen Date: Tue, 4 Jun 2024 14:56:37 -0400 Subject: [PATCH] if we cannot find a macro namespace in the current namespace try one more time w/ a global lookup --- src/main/clojure/cljs/analyzer.cljc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/clojure/cljs/analyzer.cljc b/src/main/clojure/cljs/analyzer.cljc index f0f179a49..7a8850193 100644 --- a/src/main/clojure/cljs/analyzer.cljc +++ b/src/main/clojure/cljs/analyzer.cljc @@ -3954,8 +3954,11 @@ :cljs [(identical? "clojure.repl" nstr) (find-macros-ns 'cljs.repl)]) #?@(:clj [(.contains nstr ".") (find-ns (symbol nstr))] :cljs [(goog.string/contains nstr ".") (find-macros-ns (symbol nstr))]) - :else (some-> env :ns :require-macros (get (symbol nstr)) #?(:clj find-ns - :cljs find-macros-ns))))) + :else + (or (some-> env :ns :require-macros (get (symbol nstr)) #?(:clj find-ns + :cljs find-macros-ns)) + #?(:clj (find-ns (symbol nstr)) + :cljs (find-macros-ns (symbol nstr))))))) (defn get-expander* [sym env] (when-not (or (some? (gets env :locals sym)) ; locals hide macros