From 5a82fc544eb4e25be7b1a5684cbe18118ec0b558 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 15 Jul 2020 18:56:46 +0000 Subject: Change (internal) function ::auto_mkindex_parser::slavehook to ::auto_mkindex_parser::childhook. Some people care .... --- library/auto.tcl | 18 +++++++++--------- library/tclIndex | 2 +- tests/autoMkindex.test | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/library/auto.tcl b/library/auto.tcl index 7ef5681..2deae05 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -427,10 +427,10 @@ proc auto_mkindex_parser::mkindex {file} { # auto_mkindex_parser::hook command # -# Registers a Tcl command to evaluate when initializing the slave interpreter -# used by the mkindex parser. The command is evaluated in the master +# Registers a Tcl command to evaluate when initializing the child interpreter +# used by the mkindex parser. The command is evaluated in the parent # interpreter, and can use the variable auto_mkindex_parser::parser to get to -# the slave +# the child proc auto_mkindex_parser::hook {cmd} { variable initCommands @@ -438,16 +438,16 @@ proc auto_mkindex_parser::hook {cmd} { lappend initCommands $cmd } -# auto_mkindex_parser::slavehook command +# auto_mkindex_parser::childhook command # -# Registers a Tcl command to evaluate when initializing the slave interpreter -# used by the mkindex parser. The command is evaluated in the slave +# Registers a Tcl command to evaluate when initializing the child interpreter +# used by the mkindex parser. The command is evaluated in the child # interpreter. -proc auto_mkindex_parser::slavehook {cmd} { +proc auto_mkindex_parser::childhook {cmd} { variable initCommands - # The $parser variable is defined to be the name of the slave interpreter + # The $parser variable is defined to be the name of the child interpreter # when this command is used later. lappend initCommands "\$parser eval [list $cmd]" @@ -601,7 +601,7 @@ auto_mkindex_parser::command proc {name args} { # Conditionally add support for Tcl byte code files. There are some tricky # details here. First, we need to get the tbcload library initialized in the -# current interpreter. We cannot load tbcload into the slave until we have +# current interpreter. We cannot load tbcload into the child until we have # done so because it needs access to the tcl_patchLevel variable. Second, # because the package index file may defer loading the library until we invoke # a command, we need to explicitly invoke auto_load to force it to be loaded. diff --git a/library/tclIndex b/library/tclIndex index 87a2814..5f7fbfb 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -15,7 +15,7 @@ set auto_index(::auto_mkindex_parser::init) [list ::tcl::Pkg::source [file join set auto_index(::auto_mkindex_parser::cleanup) [list ::tcl::Pkg::source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::mkindex) [list ::tcl::Pkg::source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::hook) [list ::tcl::Pkg::source [file join $dir auto.tcl]] -set auto_index(::auto_mkindex_parser::slavehook) [list ::tcl::Pkg::source [file join $dir auto.tcl]] +set auto_index(::auto_mkindex_parser::childhook) [list ::tcl::Pkg::source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::command) [list ::tcl::Pkg::source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::commandInit) [list ::tcl::Pkg::source [file join $dir auto.tcl]] set auto_index(::auto_mkindex_parser::fullname) [list ::tcl::Pkg::source [file join $dir auto.tcl]] diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test index b42d50d..85f7c0b 100644 --- a/tests/autoMkindex.test +++ b/tests/autoMkindex.test @@ -164,17 +164,17 @@ test autoMkindex-2.1 {commands on the autoload path can be imported} -setup { # Test auto_mkindex hooks -# Slave hook executes interesting code in the interp used to watch code. -test autoMkindex-3.1 {slaveHook} -setup { +# Child hook executes interesting code in the interp used to watch code. +test autoMkindex-3.1 {childHook} -setup { file delete tclIndex } -body { - auto_mkindex_parser::slavehook { + auto_mkindex_parser::childhook { _%@namespace eval ::blt { proc foo {} {} _%@namespace export foo } } - auto_mkindex_parser::slavehook { _%@namespace import -force ::blt::* } + auto_mkindex_parser::childhook { _%@namespace import -force ::blt::* } auto_mkindex . autoMkindex.tcl file exists tclIndex } -cleanup { -- cgit v0.12