(def$method (tty-dialog-mixin :babylon-read) (&optional special-keys)
"reads in a character or a lisp form from dialog-stream.
only those characters occurring in the list special-keys are read."
(let ((char (read-char dialog-stream)))
(cond ((member char special-keys :test 'char-equal)
(clear-input dialog-stream) char)
(t (prog2 (unread-char char dialog-stream)
(read dialog-stream)
(clear-input dialog-stream))))))
You can add the currency sign to the list (
special-keys) which is used during the invocation or redefine it like this:
(def$method (tty-dialog-mixin :babylon-read) (&optional special-keys)
"reads in a character or a lisp form from dialog-stream.
only those characters occurring in the list special-keys are read."
(let ((char (read-char dialog-stream)))
(cond ((member char special-keys :test 'char-equal)
(clear-input dialog-stream) char)
((char= char #\CURRENCY_SIGN) char)
(t (prog2 (unread-char char dialog-stream)
(read dialog-stream)
(clear-input dialog-stream))))))
But it's not standard, because the CL standard doesn't define a representation of any unicode char so for a better portability you should use something like:
(char "¤" 0)
instead of #\CURRENCY_SIGN. Still it's not a CL
conformant.
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of
CLHS (and the dark themed
version). Temporary mirrors of aferomentioned:
CLHS and a
dark version.