;;; -*-Scheme-*-
;;;
-;;; $Id: syntactic-closures.scm,v 14.3 2002/02/12 00:30:29 cph Exp $
+;;; $Id: syntactic-closures.scm,v 14.4 2002/02/12 21:17:47 cph Exp $
;;;
;;; Copyright (c) 1989-1991, 2001, 2002 Massachusetts Institute of Technology
;;;
;;; modified.
(define (environment/lookup environment name)
- (and (environment-bound? environment name)
- (let ((item (environment-lookup-macro environment name)))
- (cond ((or (item? item) (not item))
- item)
- ;; **** Kludge to support bootstrapping.
- ((procedure? item)
- (non-hygienic-macro-transformer->expander item environment))
- (else
- (error:wrong-type-datum item "syntactic keyword"))))))
+ (let ((item (environment-lookup-macro environment name)))
+ (cond ((or (item? item) (not item))
+ item)
+ ;; **** Kludge to support bootstrapping.
+ ((procedure? item)
+ (non-hygienic-macro-transformer->expander item environment))
+ (else
+ (error:wrong-type-datum item "syntactic keyword")))))
(define (environment/define environment name item)
(environment-define-macro environment name item))
#| -*-Scheme-*-
-$Id: uenvir.scm,v 14.54 2002/02/12 15:13:47 cph Exp $
+$Id: uenvir.scm,v 14.55 2002/02/12 21:17:30 cph Exp $
Copyright (c) 1988-1999, 2001, 2002 Massachusetts Institute of Technology
(else value))))
(define (environment-lookup-macro environment name)
- (let ((value (environment-safe-lookup environment name)))
- (and (macro-reference-trap? value)
- (macro-reference-trap-transformer value))))
+ (and (eq? 'MACRO (environment-reference-type environment name))
+ (let ((value (environment-safe-lookup environment name)))
+ (and (macro-reference-trap? value)
+ (macro-reference-trap-transformer value)))))
(define (environment-safe-lookup environment name)
(cond ((interpreter-environment? environment)