Hello Marco,

When I load this file in the most recent ECL (from develop branch), I have:

Top level in: #<process TOP-LEVEL 0x7fbf56de8f00>.
> (load "/tmp/xx.lisp")
It's eval time
#P"/tmp/xx.lisp"
> *evfoo*

"eval-when foo"

Best regards,
Daniel

--
Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland
TurtleWare - Daniel Kochmański      | www.turtleware.eu

"Be the change that you wish to see in the world." - Mahatma Gandhi


On Saturday, March 7th, 2026 at 1:51 PM, Marco Antoniotti <marco.antoniotti@unimib.it> wrote:
Hi

I have a test file that contains the following (and nothing more)

(eval-when (:load-toplevel :execute)
(format t "It's eval time~%")
(defparameter *evfoo* "eval-when foo"))

This is what happens in SBCL.

CL-USER> (load "ew.lisp")
It's eval time
T
CL-USER> *evfoo*
"eval-when foo"
CL-USER>

While in LW (and, similarly, in ECL) this happens

CL-USER 20 > (load "ew.lisp")
; Loading text file /Users/marcoxa/Projects/Lang/CL/Temp/ew.lisp
It's eval time
#P"/Users/marcoxa/Projects/Lang/CL/Temp/ew.lisp"

CL-USER 21 > *ewfoo*

Error: The variable *EWFOO* is unbound.
1 (continue) Try evaluating *EWFOO* again.
2 Specify a value to use this time instead of evaluating *EWFOO*.
3 Specify a value to set *EWFOO* to.
4 (abort) Return to top loop level 0.

Type :b for backtrace, or :c <option number> to proceed, or :a to abort.
Type :bug-form "<subject>" for a bug report template or :? for other options.

CL-USER 22 : 1 >


Any hermeneutics about this?

Cheers

--
Marco Antoniotti, Professor, Director tel. +39 - 02 64 48 79 01
DISCo, University of Milan-Bicocca U14 2043 http://dcb.disco.unimib.it
Viale Sarca 336
I-20126 Milan (MI) ITALY

REGAINS: https://regains.disco.unimib.it/