mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
(scm_lreadr): Simply do (symbol->keyword (read)) after
reading '#:' or ':'. See NEWS for consequences.
This commit is contained in:
parent
db74ed0306
commit
f13b4400d3
1 changed files with 3 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue