On Tue 09 Jun 2009 21:27, Mark H Weaver <m...@netris.org> writes: > According to node "User level options interfaces" of api-options.texi, > (debug-options 'full) should print a list of options, but it fails > with "ERROR: unbound variable: option-name". The other options > interfaces (eval-options, read-options, print-options, traps) are > broken as well. > > The problem is here, in boot-9.scm: > > (defmacro define-option-interface (option-group) > (let* ((option-name car) > (option-value cadr) > (option-documentation caddr) > > ;; Below follow the macros defining the run-time option interfaces. > > (make-options (lambda (interface) > `(lambda args > (cond ((null? args) (,interface)) > ((list? (car args)) > (,interface (car args)) (,interface)) > (else (for-each > (lambda (option) > (display (option-name option)) > (if (< (string-length > (symbol->string > (option-name option))) > 8) > (display #\tab)) > (display #\tab) > (display (option-value option)) > (display #\tab) > (display (option-documentation > option)) > (newline)) > (,interface #t))))))) > [...etc...] > > How was this supposed to work? How were the local bindings of > option-name, option-value, and option-documentation supposed to be > referenced from within the expansion of this non-hygienic macro?
Umm... Oops :) See, these things used to be "memoizing macros", the thing that Guile's old defmacros were built on. I translated them to defmacros, but, um, not very well, apparently ;-) I'll see if I can push a fix. BTW I pushed something that might affect the stack overflow issue, can you give that a try? I have one report of it working where it didn't use to work. Cheers, Andy -- http://wingolog.org/