Thread View: comp.lang.scheme.c
1 messages
1 total messages
Started by Kardan Kaveh
Sun, 24 Jan 1993 05:10
macro question
Author: Kardan Kaveh
Date: Sun, 24 Jan 1993 05:10
Date: Sun, 24 Jan 1993 05:10
40 lines
1737 bytes
1737 bytes
In an effort to have my macro definitions exist in all my source files,
I have placed the following code in my init file:
(define-macro (define-macro-both pattern . body)
`(begin
(define-macro ,pattern ,@body)
(syntax-table-define system-global-syntax-table ',(car pattern)
(macro ,(cdr pattern)
,@body))))
(syntax-table-define user-initial-syntax-table 'define-macro-both
(macro (pattern . body)
`(begin
(define-macro ,pattern ,@body)
(syntax-table-define system-global-syntax-table ',(car pattern)
(macro ,(cdr pattern)
,@body)))))
(set! syntaxer/default-environment user-initial-environment)
The first two forms are from the macros.txt documentation file.
These have the desired effect when the code is interpreted, but when I compile
a file containing a macro which refers to a function defined in the same file,
or a file refering to a macro defined elsewhere, the interpreter complains
about unbound variables.
What do I need to do to make macros behave, in compiled code, the same
as in interpreted code?
Thanks,
Kaveh
--
------------
Kaveh Kardan kaveh@taarna.UUCP
Systeme Taarna kardank@eole.umontreal.qc.ca
Montreal Quebec Canada (514)844-8448
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads