Use a fluid for the list of the reader's "hash procedures"
authorAndreas Rottmann <a.rottmann@gmx.at>
Tue, 2 Nov 2010 23:09:57 +0000 (00:09 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 2 Nov 2010 23:09:57 +0000 (00:09 +0100)
commitd458073bc0ac57db1bd3543bf4cf7fa0333fa69d
tree42199c4b61dff6fdff2c1ed3f943b6966e067cc8
parent6887d0a1c6b6a6478840bbb8f2ff0a041a5b983e
Use a fluid for the list of the reader's "hash procedures"

This allows customizing the reader behavior for a dynamic extent more easily.

* libguile/read.c (scm_read_hash_procedures): Renamed to
  `scm_i_read_hash_procedures'.
  (scm_i_read_hash_procedures_ref, scm_i_read_hash_procedures_set_x):
  New (internal) accessor functions for the fluid.
  (scm_read_hash_extend, scm_get_hash_procedure): Use these accessor
  functions.
  (scm_init_read): Create the fluid, named `%read-hash-procedures' instead of
  the previous plain list `read-hash-procedures'.

* test-suite/tests/reader.test: Adapt the "R6RS/SRFI-30 block comment
  syntax overridden" test to make use of the fluid.

* module/ice-9/deprecated.scm (read-hash-procedures):
  New identifier macro -- backward-compatibility shim.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
libguile/read.c
module/ice-9/deprecated.scm
test-suite/tests/reader.test