Page 1 of 1

Remove functions from readtables?

Posted: Thu Jun 12, 2014 3:24 am
by porky11
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:

Code: Select all

(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?

Posted: Thu Jun 12, 2014 4:44 am
by Goheeca
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).

Re: Remove functions from readtables?

Posted: Fri Jun 13, 2014 1:43 am
by marcoxa
I know better ways to indulge in masochistic fetishes :mrgreen: