[plt-scheme] Unable to expand to a correct prefix in macro...
Matthew Flatt wrote:
> At Tue, 24 Apr 2007 13:35:45 -0700, "Yin-So Chen" wrote:
>
>> (define-syntax require-prefix
>> (lambda (stx)
>> (syntax-case stx ()
>> ((_ req-clause)
>> (with-syntax ((pref (datum->syntax-object stx (string->symbol
>> "a:"))))
>> #`(require (prefix pref req-clause))))
>>
>
> The context of the `(prefix ...)' form determines the binding context
> of the imports. So, you need to give the `(prefix ...)' part the
> original context.
>
>
How does one know when a special form requires the original context of
the syntax to do its job properly? Are there special rules?