This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Remove functions from readtables?

3 posts · 3567 views

Is it possible to remove some symbols from a readtable or to create an empty readtable, where I have to set all reader macros myself.

(copy-readtable) can only copy existing readtables and recreate the default readtable
(set-macro-character) can only set functions

This works, but it seems stupid to me:
(set-syntax-from-char #\' #\x)
PS: if I redefine I also should redefine the Print-function, because of reading, but I don't find, how to do this.

Re: Remove functions from readtables?

There is only one option to edit (use some kind of an empty function in set-macro-character) setup-omnivore-readmacro*. But there is a dilemma on the line 83, it could be partially solved by creating the constant of an empty readtable in case you choose char-code-limit, I mean the speed problem of iterating over the whole set of unicode characters.
The printing part: I was discussing it in this topic.

* It's an ugly approach as I stated here (in the section Goheeca's remarks).
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.

Re: Remove functions from readtables?

I know better ways to indulge in masochistic fetishes :mrgreen:
Marco Antoniotti