aboutsummaryrefslogtreecommitdiff
path: root/jim_tcl.txt
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2014-12-03 13:50:38 +1000
committerSteve Bennett <steveb@workware.net.au>2014-12-09 13:07:55 +1000
commitb807e3c1640870464ced1859c29d200188df12ab (patch)
tree16c882a2df213df8365316870d9715e282910430 /jim_tcl.txt
parent9d6004a26d406aa9331fae3ffcb26be298be552d (diff)
downloadjimtcl-b807e3c1640870464ced1859c29d200188df12ab.zip
jimtcl-b807e3c1640870464ced1859c29d200188df12ab.tar.gz
jimtcl-b807e3c1640870464ced1859c29d200188df12ab.tar.bz2
add support for [info source ?filename line?]
Allows a script to be created with explicit source info Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim_tcl.txt')
-rw-r--r--jim_tcl.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index 36c4e70..959aff2 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -65,6 +65,7 @@ Changes between 0.74 and 0.75
10. Add support for `file link`
11. `glob` now supports the '--tails' option
12. Add support for `string cat`
+13. Allow `info source` to add source info
Changes between 0.73 and 0.74
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2735,10 +2736,12 @@ The legal +'option'+'s (which may be abbreviated) are:
of the innermost file being processed. Otherwise the command returns an
empty string.
-+*info source* 'script'+::
- Returns the original source location of the given script as a list of
++*info source* 'script ?filename line?'+::
+ With a single argument, returns the original source location of the given script as a list of
+{filename linenumber}+. If the source location can't be determined, the
- list +{{} 0}+ is returned.
+ list +{{} 0}+ is returned. If +'filename'+ and +'line'+ are given, returns a copy
+ of +'script'+ with the associate source information. This can be useful to produce
+ useful messages from `eval`, etc. if the original source information may be lost.
+*info stacktrace*+::
After an error is caught with `catch`, returns the stack trace as a list