diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-01 15:03:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-02-01 15:03:59 (GMT) |
commit | 3bf70f8a7d94966b183bc23250a2b45fd4248241 (patch) | |
tree | a3a8dd299606092b7219a6d8ae10b5deba724aab /library/history.tcl | |
parent | 8826c4b5dc048432fbed200da55eef080c75b32c (diff) | |
parent | 680d27740a871cd27464c07ed2afee0f4104dbd4 (diff) | |
download | tcl-pyk_emptystring.zip tcl-pyk_emptystring.tar.gz tcl-pyk_emptystring.tar.bz2 |
merge trunkpyk_emptystring
Diffstat (limited to 'library/history.tcl')
-rw-r--r-- | library/history.tcl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/library/history.tcl b/library/history.tcl index 51d2404..ef9099b 100644 --- a/library/history.tcl +++ b/library/history.tcl @@ -56,6 +56,30 @@ proc ::history {args} { tailcall apply {arglist {tailcall history {*}$arglist} ::tcl} $args } +# (unnamed) -- +# +# Callback when [::history] is destroyed. Destroys the implementation. +# +# Parameters: +# oldName what the command was called. +# newName what the command is now called (an empty string). +# op the operation (= delete). +# +# Results: +# none +# +# Side Effects: +# The implementation of the [::history] command ceases to exist. + +trace add command ::history delete [list apply {{oldName newName op} { + variable history + unset -nocomplain history + foreach c [info procs ::tcl::Hist*] { + rename $c {} + } + rename ::tcl::history {} +} ::tcl}] + # tcl::HistAdd -- # # Add an item to the history, and optionally eval it at the global scope |