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.
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