┌─[phoe][phoetower][~] └─▪ cat /tmp/b.lisp (in-package #:cl-user) ;; Read a symbol, then a lisp term. Sometimes the symbol is NIL, instead of FOO #.(set-dispatch-macro-character #\# #\{ (lambda (stream char n) (declare (ignore char n)) (let ((langname (read stream t nil t))) (format t "Language ~s at ~s~%" langname (file-position stream)) (unless langname (format t " It was NIL!~%"))) ;; Return the read term (read stream t nil t))) #{foo (format t "1~%") #{foo (format t "2~%") ;; If this line is commented out, then everything works. The unused var warning mungs up the read order #{foo (let ((a 1)) (format t "3~%")) #{foo (format t "4~%") ┌─[phoe][phoetower][~] └─▪ sbcl --script /tmp/b.lisp Language FOO at 717 1 Language FOO at 740 2 Language FOO at 868 3 Language FOO at 905 4