Subject: Re: Disabling colon in readtable?
From: Erik Naggum <erik@naggum.no>
Date: 1996/06/05
Newsgroups: comp.lang.lisp
Message-ID: <3042924295487785@arcana.naggum.no>


[John R. "Bob" Bane]

|   Is there any way to disable the package-delimiter function of the colon
|   in a Common Lisp readtable?

when I went looking for this some months ago, I looked at the internals in
CMUCL and found a work-around.  this is most probably completely local to
CMUCL, but it may indicate that there is hope, if nothing else:

    (set-syntax-from-char #\: #\a *readtable* *readtable*)
    (common-lisp::set-secondary-attribute #\: 
      (common-lisp::get-secondary-attribute #\a))

now,

    (read-from-string "foo:bar")
 => |FOO:BAR|

I never bothered to look for the magic in the symbol printer, but it seems
that some similar internal table hackery is needed.  pity they aren't just
a little bit more programmer-friendly.

|   Am I missing something, or is there something strange about Allegro CL?

once a symbol is started by a constituent, the package-delimiter is part of
the internal makeup of a symbol.  like numbers, these are not read by user
code or macro characters, but by the reader itself.  unfortunately, this is
the one part of the reader that is not user configurable, either.  bummer.

-- 
sometimes a .sig is just a .sig