diff options
author | Mark H Weaver <mhw@netris.org> | 2012-10-23 00:21:12 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2012-10-23 22:44:49 -0400 |
commit | 3655ed89834b9896fe267107c50cc4af8e0b5ecf (patch) | |
tree | a5ed8b3bd76c2b2da10c21e7d71b08b9e940cc08 | |
parent | b1b5433d66ccc8267a70c6ca3c0a630bddea4edb (diff) | |
download | guile-3655ed89834b9896fe267107c50cc4af8e0b5ecf.tar.gz |
Add source properties to more datum types in scm_read_sharp_extension.
* libguile/read.c (scm_read_sharp_extension): Attach source properties
to the result of a custom token reader if the returned datum is not
immediate. Previously, source properties were added to pairs only.
-rw-r--r-- | libguile/read.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/read.c b/libguile/read.c index 9c8bff65f..0bbabc27b 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -1500,7 +1500,8 @@ scm_read_sharp_extension (int chr, SCM port, scm_t_read_opts *opts) got = scm_call_2 (proc, SCM_MAKE_CHAR (chr), port); - if (scm_is_pair (got) && !scm_i_has_source_properties (got)) + if (opts->record_positions_p && SCM_NIMP (got) + && !scm_i_has_source_properties (got)) scm_i_set_source_properties_x (got, line, column, SCM_FILENAME (port)); return got; |