diff --git a/guile/core.scm b/guile/core.scm index fca20dbe61..5831bc7d25 100644 --- a/guile/core.scm +++ b/guile/core.scm @@ -150,7 +150,7 @@ ((callable? c) (let ((cc (make-callable ht (callable-unbox c) - (and (hash-table? ht) (hash-ref ht "ismacro")) + #f (callable-closure c)))) cc)) (else diff --git a/scheme/lib/core.sld b/scheme/lib/core.sld index 4d615b8d0e..8d533fdc4a 100644 --- a/scheme/lib/core.sld +++ b/scheme/lib/core.sld @@ -275,7 +275,7 @@ ((func? x) (let ((func (make-func (func-ast x) (func-params x) (func-env x) (func-fn x)))) - (func-macro?-set! func (func-macro? x)) + (func-macro?-set! #f) (func-meta-set! func meta) func)) (else diff --git a/tests/stepA_mal.mal b/tests/stepA_mal.mal index 70da5ea890..8771074c80 100644 --- a/tests/stepA_mal.mal +++ b/tests/stepA_mal.mal @@ -64,6 +64,19 @@ (meta +) ;=>nil +;; Testing fn? function +(fn? +) +;=>true +(fn? (fn* () 0)) +;=>true +(fn? cond) +;=>false +(fn? "+") +;=>false +(fn? :+) +;=>false +(fn? ^{"ismacro" true} (fn* () 0)) +;=>true ;; ;; Make sure closures and metadata co-exist @@ -139,18 +152,6 @@ (def! add1 (fn* (x) (+ x 1))) -;; Testing fn? function -(fn? +) -;=>true -(fn? add1) -;=>true -(fn? cond) -;=>false -(fn? "+") -;=>false -(fn? :+) -;=>false - ;; Testing macro? function (macro? cond) ;=>true