[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (debug-options 'full) is broken
From: |
Andy Wingo |
Subject: |
Re: (debug-options 'full) is broken |
Date: |
Tue, 09 Jun 2009 23:58:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
On Tue 09 Jun 2009 21:27, Mark H Weaver <address@hidden> 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/