Standard common-lisp defines many reader macros such as (
and )
for grouping, '
for quote
, "
for string quotation, |
for symbol quotation, #
for dispatch macro, etc. Now I want to disable them all and use my own ones, and I have to call set-macro-character
one by one to disable them all and then define my own ones.
I have found that there's one way to restore all reader macros to standard ones by calling (setf *readtable* (copy-readtable nil))
, but is there a way to set them to empty(i.e., all the characters are treated as normal letters and numbers)?
I don't think there's a way. The expectation is that you're just making incremental modifications to the Lisp reader, not trying to replace it wholesale. It's not really designed to be used that way, because you can't define everything as a macro -- most of the constituent characters are associated with built-in behaviors that can't be defined as reader macros.