This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: readtable support added to Kawa
- From: Jocelyn Paine <popx at ifs dot org dot uk>
- To: kawa at sources dot redhat dot com
- Date: Wed, 22 Jan 2003 14:04:57 +0000 (GMT)
- Subject: Re: readtable support added to Kawa
Should updating the result of (current-readtable) alter the behaviour of
reading on the current port?
Let's say I want to read #$foo as if it were (dollars foo). I load this
code:
(require 'readtable)
(define (dollar-reader port subchar arg)
(list 'dollars (read port))
)
(set-dispatch-macro-character #\# #\$ dollar-reader (current-readtable))
but then:
#|kawa:6|# #$foo
<stdin>:6:3: invalid dispatch character '$'
The same thing happens if I replace the dollar-reader function by a
function that just writes its arguments, so it looks as though the
function is never getting called.
This is using the 1.6.99 release. I can see what the relevant slib file
(gnu/kawa/slib/readtable.scm) is defining (current-readtable) to return,
but I haven't yet worked out where in the code the reader accesses this.
Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091