From f13b4400d3179f3dade448d7974f0ff96429b798 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 4 Oct 2004 18:03:18 +0000 Subject: [PATCH] (scm_lreadr): Simply do (symbol->keyword (read)) after reading '#:' or ':'. See NEWS for consequences. --- libguile/read.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libguile/read.c b/libguile/read.c index 8422584f5..c3c895cd9 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -492,9 +492,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) /* #:SYMBOL is a syntax for keywords supported in all contexts. */ case ':': - j = scm_read_token ('-', tok_buf, port, 0); - p = scm_string_to_symbol (scm_c_substring_copy (*tok_buf, 0, j)); - return scm_make_keyword_from_dash_symbol (p); + return scm_symbol_to_keyword (scm_read (port)); default: callshrp: @@ -633,11 +631,8 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) case ':': if (scm_is_eq (SCM_PACK (SCM_KEYWORD_STYLE), scm_keyword_prefix)) - { - j = scm_read_token ('-', tok_buf, port, 0); - p = scm_string_to_symbol (scm_c_substring (*tok_buf, 0, j)); - return scm_make_keyword_from_dash_symbol (p); - } + return scm_symbol_to_keyword (scm_read (port)); + /* fallthrough */ default: #if SCM_ENABLE_ELISP