From 6b1cce1c24dfe142c5566bc3f08cdd55108de38b Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Tue, 18 Nov 2003 20:36:39 +0000 Subject: [PATCH] * tkcon.tcl (::tkcon::InitSlave): remove tk_library from the seeded auto_path. Do not add OPT(library) to auto_path if it is "". --- ChangeLog | 5 +++++ tkcon.tcl | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9a4a82..d8e2a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-11-18 Jeff Hobbs + + * tkcon.tcl (::tkcon::InitSlave): remove tk_library from the + seeded auto_path. Do not add OPT(library) to auto_path if it is "". + 2003-11-04 Jeff Hobbs * tkcon.tcl (::tkcon::EvalSocketClosed): use tk_messageBox instead diff --git a/tkcon.tcl b/tkcon.tcl index 6c4ac59..078f363 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -285,7 +285,7 @@ proc ::tkcon::Init {args} { if {[info exists env(TK_CON_LIBRARY)]} { lappend ::auto_path $env(TK_CON_LIBRARY) - } else { + } elseif {$OPT(library) != ""} { lappend ::auto_path $OPT(library) } @@ -431,7 +431,7 @@ proc ::tkcon::InitSlave {slave args} { variable OPT variable COLOR variable PRIV - global argv0 tcl_interactive tcl_library env auto_path + global argv0 tcl_interactive tcl_library env auto_path tk_library if {[string match {} $slave]} { return -code error "Don't init the master interpreter, goofball" @@ -442,7 +442,9 @@ proc ::tkcon::InitSlave {slave args} { $slave alias load SafeLoad $slave $slave alias open SafeOpen $slave $slave alias file file - interp eval $slave [dump var -nocomplain tcl_library auto_path env] + interp eval $slave \ + [list set auto_path [lremove $auto_path $tk_library]] + interp eval $slave [dump var -nocomplain tcl_library env] interp eval $slave { catch {source [file join $tcl_library init.tcl]} } interp eval $slave { catch unknown } } @@ -462,7 +464,7 @@ proc ::tkcon::InitSlave {slave args} { } if {[info exists argv0]} {interp eval $slave [list set argv0 $argv0]} interp eval $slave set tcl_interactive $tcl_interactive \; \ - set auto_path [list $auto_path] \; \ + set auto_path [list [lremove $auto_path $tk_library]] \; \ set argc [llength $args] \; \ set argv [list $args] \; { if {![llength [info command bgerror]]} { -- 2.23.0