|
29 | 29 | namespace eval tk { |
30 | 30 | namespace eval test { |
31 | 31 |
|
32 | | - # auto_ns_vars -- |
33 | | - # |
34 | | - # Each new namespace automatically holds several variables upvar'ed |
35 | | - # from the global namespace. Notably: |
36 | | - # |
37 | | - # argc argv argv0 auto_index auto_path env tcl_interactive tcl_library \ |
38 | | - # tcl_patchLevel tcl_pkgPath tcl_platform tcl_rcFileName tcl_version |
39 | | - # |
40 | | - # proc testutils (see below) needs to know about them to keep track of |
41 | | - # newly created variables. |
42 | | - # |
43 | | - variable auto_ns_vars [namespace eval tmp {info vars}] |
44 | | - namespace delete tmp |
45 | | - |
46 | 32 | proc assert {expr} { |
47 | 33 | if {! [uplevel 1 [list expr $expr]]} { |
48 | 34 | return -code error "assertion failed: \"[uplevel 1 [list subst -nocommands $expr]]\"" |
@@ -255,15 +241,12 @@ namespace eval tk { |
255 | 241 | set importedVars($domain) [list] |
256 | 242 | } |
257 | 243 | if {$option ne "-novars"} { |
258 | | - variable auto_ns_vars |
259 | 244 | if {[namespace inscope ::tk::test::$domain {info procs init}] eq "init"} { |
260 | 245 | ::tk::test::${domain}::init |
261 | 246 | } |
262 | 247 | foreach varName [namespace inscope ::tk::test::$domain {info vars}] { |
263 | | - if {$varName ni $auto_ns_vars} { |
264 | | - uplevel 1 [list upvar #0 ::tk::test::${domain}::$varName $varName] |
265 | | - lappend importedVars($domain) $varName |
266 | | - } |
| 248 | + uplevel 1 [list upvar #0 ::tk::test::${domain}::$varName $varName] |
| 249 | + lappend importedVars($domain) $varName |
267 | 250 | } |
268 | 251 | } |
269 | 252 | } else { |
@@ -906,6 +889,7 @@ namespace eval ::tk::test::select { |
906 | 889 | } |
907 | 890 |
|
908 | 891 | namespace eval ::tk::test::text { |
| 892 | + |
909 | 893 | proc init {} { |
910 | 894 | variable fixedFont {Courier -12} |
911 | 895 | variable fixedWidth [font measure $fixedFont m] |
|
0 commit comments