summaryrefslogtreecommitdiff
path: root/libguile/deprecated.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-09-03 22:55:08 +0200
committerAndy Wingo <wingo@pobox.com>2020-09-03 22:55:08 +0200
commit6f6abb3bb57e54444fd68ebcd451032fb5ce19c0 (patch)
tree94121e8230b834e56912779e8156a8988bcee213 /libguile/deprecated.c
parent837580587ba8dfab22ad74e3b4c062df00ca7422 (diff)
downloadguile-6f6abb3bb57e54444fd68ebcd451032fb5ce19c0.tar.gz
Clean up srcprops implementation
* libguile/deprecated.c (scm_sym_copy, scm_make_srcprops): Deprecate. * libguile/deprecated.h (scm_tc16_srcprops) (SCM_SOURCE_PROPERTY_FLAG_BREAK): Deprecate. * libguile/private-options.h (SCM_COPY_SOURCE_P): Remove. * libguile/read.c (struct t_read_opts, scm_read_options): Remove useless copy read option. (maybe_annotate_source): Change line and column to be tagged, and subtract off lookahead here. Change all callers. (READ_OPTION_COPY_SOURCE_P): Remove, renumbering other options. (init_read_options): Remove copy option. * libguile/srcprop.c: Change to put filename inline in source properties. Update private implementation. * libguile/srcprop.h (SCM_PROCTRACEP): Remove. Unusable given that scm_sym_trace was undefined.
Diffstat (limited to 'libguile/deprecated.c')
-rw-r--r--libguile/deprecated.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 1cdc9dfac..0b9ce3558 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -27,13 +27,17 @@
#define SCM_BUILDING_DEPRECATED_CODE
+#include "alist.h"
#include "boolean.h"
#include "bitvectors.h"
#include "deprecation.h"
#include "gc.h"
#include "gsubr.h"
+#include "procprop.h"
+#include "srcprop.h"
#include "srfi-4.h"
#include "strings.h"
+#include "symbols.h"
#include "deprecated.h"
@@ -569,6 +573,19 @@ scm_istr2bve (SCM str)
return res;
}
+SCM_GLOBAL_SYMBOL (scm_sym_copy, "copy");
+
+SCM
+scm_make_srcprops (long line, int col, SCM filename, SCM copy, SCM alist)
+{
+ scm_c_issue_deprecation_warning
+ ("scm_make_srcprops is deprecated; use set-source-properties! instead");
+
+ alist = SCM_UNBNDP (copy) ? alist : scm_acons (scm_sym_copy, copy, alist);
+ return scm_i_make_srcprops (scm_from_long (line), scm_from_int (col),
+ filename, alist);
+}
+