From 607c65842276619872ac603665751817711a998f Mon Sep 17 00:00:00 2001 From: didibus <601540+didibus@users.noreply.github.com> Date: Sun, 4 Sep 2022 14:19:45 -0700 Subject: [PATCH] Modified walk-exprs so when 'var is passed as a sepcial-form? it will also skip running eval on it and calling the handler with it. This was preventing walking macros that want to handle the var special form in different ways. --- src/riddley/walk.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/riddley/walk.clj b/src/riddley/walk.clj index cf35b2d..f99858f 100644 --- a/src/riddley/walk.clj +++ b/src/riddley/walk.clj @@ -216,7 +216,8 @@ walk-exprs' (partial walk-exprs predicate handler special-form?) x' (cond - (and (seq? x) (= 'var (first x)) (predicate x)) + (and (not (contains? special-form? 'var)) + (seq? x) (= 'var (first x)) (predicate x)) (handler (eval x)) (and (seq? x) (= 'quote (first x)) (not (predicate x)))