summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-05 11:55:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-05 11:55:56 (GMT)
commit435cd89eb85511e1dea7303fdaeef4a863e5a19c (patch)
tree72eac7cc10c5256c66609a08c44196e94e1c5f91 /library/init.tcl
parent9f5fab9296c69ae125f5d288a5cca0d1dc3321ec (diff)
parent52862763d3a3bc08041532e0afc9bf27ef9abbe0 (diff)
downloadtcl-435cd89eb85511e1dea7303fdaeef4a863e5a19c.zip
tcl-435cd89eb85511e1dea7303fdaeef4a863e5a19c.tar.gz
tcl-435cd89eb85511e1dea7303fdaeef4a863e5a19c.tar.bz2
Merge trunk. Improve test-case. Bring back "source -nopkg", but only as undocumented internal helper for ::tcl::Pkg::source.
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl8
1 files changed, 2 insertions, 6 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 9101e35..d642f05 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -472,11 +472,7 @@ proc ::tcl::Pkg::source {filename} {
if {[interp issafe]} {
uplevel 1 [list ::source $filename]
} else {
- set f [open $filename]
- fconfigure $f -eofchar \032
- set contents [read $f]
- close $f
- uplevel 1 [list eval $contents]
+ uplevel 1 [list ::source -nopkg $filename]
}
}
@@ -522,7 +518,7 @@ proc auto_load_index {} {
}
set name [lindex $line 0]
set auto_index($name) \
- "source [file join $dir [lindex $line 1]]"
+ "::tcl::Pkg::source [file join $dir [lindex $line 1]]"
}
} else {
error "[file join $dir tclIndex] isn't a proper Tcl index file"