summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-04 08:41:58 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-04 08:41:58 -0700
commit0abbda4a698bc0f3eb531c6578469c3dff65ad57 (patch)
tree10f2e64bc96c6d06452c710aa311e5c99fad05d3 /txr.1
parent4ecca7c0b2ac3d61658d749f51dc1e7fbc408ed8 (diff)
downloadtxr-0abbda4a698bc0f3eb531c6578469c3dff65ad57.tar.gz
txr-0abbda4a698bc0f3eb531c6578469c3dff65ad57.tar.bz2
txr-0abbda4a698bc0f3eb531c6578469c3dff65ad57.zip
* eval.c (force): Default the new second argument of source_loc_str.
(eval_error): Derive location of error from the last_form_evaled, if form doesn't have it. (eval_init): Re-register source-loc-str as binary with an optional arg. * match.c (debuglf, sem_error, file_err, typed_error): Default new argument of source_loc_str. * parser.h (source_loc_str): Declaration updated. * parser.l (source_loc_str): Take second argument which specifies alternative value if the source loc info is not found. * unwind.c (uw_throw): Simplify code thanks to source_loc_str default argument. * txr.1: Document new argument of source-loc-str.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.111
1 files changed, 8 insertions, 3 deletions
diff --git a/txr.1 b/txr.1
index 19984c25..cefd833e 100644
--- a/txr.1
+++ b/txr.1
@@ -30985,7 +30985,7 @@ one specifies the result of
.coNP Functions @ source-loc and @ source-loc-str
.synb
.mets (source-loc << form )
-.mets (source-loc-str << form )
+.mets (source-loc-str << form <> [ alternative ])
.syne
.desc
These functions map an expression in a \*(TX program to the file name and
@@ -31009,9 +31009,14 @@ is not a piece of the program source code that was constructed by the
.code source-loc
returns
.codn nil ,
-and
+and, in the absence of the
+.meta alternative
+argument,
.code source-loc-str
-returns a string whose text says that source location is not available.
+returns a string whose text says that source location is not available,
+otherwise it returns the
+.meta alternative
+argument.
.coNP Function @ rlcp
.synb