Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

are *LOAD-VERBOSE* and friends recursive?

1 view
Skip to first unread message

Sam Steingold

unread,
Sep 12, 2002, 1:56:16 PM9/12/02
to
suppose file "foo.lisp" contains a form '(load "bar")'.
when I eval '(load "foo" :verbose t)', is "bar" loaded verbosely?
IOW, how is LOAD defined:
(defun load (filespec &key (verbose *load-verbose*) ...) ...)
or
(defun load (filespec &key ((:verbose *load-verbose*) *load-verbose*) ...) ...)
CLHS does not say that LOAD binds *LOAD-VERBOSE*,
does it mean it may not bind it?
If this decision is left to the implementors,
what behavior do people consider more useful?
Thanks.
Sam.

Will Deakin

unread,
Sep 12, 2002, 2:56:29 PM9/12/02
to
Sam Steingold wrote:
> suppose file "foo.lisp" contains a form '(load "bar")'.
[...elided excellent description of problem...]

> CLHS does not say that LOAD binds *LOAD-VERBOSE*,
> does it mean it may not bind it?

Not being a language lawyer, I'll have to punt this one.

> If this decision is left to the implementors,
> what behavior do people consider more useful?

I would expect the ((:verbose *load-verbose*) *load-verbose*) version.
Probably from the spurious reasoning that *load-verbose* is a *starred*
variable and should have the same value unless it is explicity set to
another value. If given another value, I would expect the new value to
be honoured within the scope of the binding.

Finally, from my reading of the cmucl source, this defines load with
((:verbose *load-verbose*) *load-verbose*).

:)w

0 new messages