diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-04-13 10:37:31 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-06-01 12:05:19 +1000 |
commit | a2694699f8d3d14465cbd9310678ab723f4bc79f (patch) | |
tree | ca178158c7026183715cf6643c5d2de02ab73553 /tclcompat.tcl | |
parent | 229239b9443c366f90ca251ede04bfa04ae16cc2 (diff) | |
download | jimtcl-a2694699f8d3d14465cbd9310678ab723f4bc79f.zip jimtcl-a2694699f8d3d14465cbd9310678ab723f4bc79f.tar.gz jimtcl-a2694699f8d3d14465cbd9310678ab723f4bc79f.tar.bz2 |
Add [upcall] command
Allows previous command definitions to be invoked when
otherwise hidden via [local]
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tclcompat.tcl')
-rw-r--r-- | tclcompat.tcl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tclcompat.tcl b/tclcompat.tcl index 262aae8..8559edc 100644 --- a/tclcompat.tcl +++ b/tclcompat.tcl @@ -162,11 +162,9 @@ proc popen {cmd {mode r}} { } # A wrapper around 'pid' which can return the pids for 'popen' -if {[info commands pid] ne ""} { -rename pid .pid -proc pid {{chan {}}} { +local proc pid {{chan {}}} { if {$chan eq ""} { - tailcall .pid + tailcall upcall pid } if {[catch {$chan tell}]} { return -code error "can not find channel named \"$chan\"" @@ -176,7 +174,6 @@ proc pid {{chan {}}} { } return $pids } -} # try/on/finally conceptually similar to Tcl 8.6 # |