[slime-devel] Copying and pasting in the REPL

Robert St. Amant stamant at csc.ncsu.edu
Mon Mar 5 19:40:29 UTC 2007


New subscriber here--I hope this isn't something that's already been  
discussed, and that it's targeted at the right mailing list.

During a class I'm teaching, I typed the following into the REPL:

CL-USER> (macroexpand '(prog1 1))
(LET ((#:G74 1)) #:G74)
T

To show my students how the reader handles gensyms, I then cut and  
pasted the result above:

CL-USER> (LET ((#:G74 1)) #:G74)
1

This was unexpected.  I then tried typing the same form in, which  
gave what I expected, an error:

CL-USER> (let ((#:g74 1)) #:g74)
;Compiler warnings :
;   Undeclared free variable #:G74, in an anonymous lambda form.
;   Unused lexical variable #:G74, in an anonymous lambda form.
Invoking restart: Abort handling SLIME request.
; Evaluation aborted

Am I suffering under a basic misunderstanding about what should  
happen in this situation?  It looks as if in the second expression  
above, the reader is somehow being bypassed for input that comes out  
the kill ring.

Regards,
Rob St. Amant



More information about the slime-devel mailing list