diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-12 10:21:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-12-12 10:21:55 (GMT) |
commit | 454b7f29d0703cf980ef403b12c5185f92e0c92e (patch) | |
tree | be5d15b6ce8fb5fbc3c1198cfcb05bb923cfd0ea /library/tm.tcl | |
parent | 1f46b14efb4cff5cd99eecd20058ec3d98b283a5 (diff) | |
download | tcl-454b7f29d0703cf980ef403b12c5185f92e0c92e.zip tcl-454b7f29d0703cf980ef403b12c5185f92e0c92e.tar.gz tcl-454b7f29d0703cf980ef403b12c5185f92e0c92e.tar.bz2 |
allow novem to use installed Tcl8 .tm packages, such as tcltest and msgcat
remove some dead code (already planned to be removed in Tcl9)
Diffstat (limited to 'library/tm.tcl')
-rw-r--r-- | library/tm.tcl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/library/tm.tcl b/library/tm.tcl index ce8a013..4288658 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -330,6 +330,19 @@ proc ::tcl::tm::Defaults {} { } } } + if {$major == 8} return + for {set n 7} {$n >= 0} {incr n -1} { + foreach ev [::list \ + TCL8.${n}_TM_PATH \ + TCL8_${n}_TM_PATH \ + ] { + if {![info exists env($ev)]} continue + foreach p [split $env($ev) $sep] { + path add $p + } + } + } + } return } @@ -358,6 +371,16 @@ proc ::tcl::tm::roots {paths} { set px [file join $p site-tcl] if {![interp issafe]} {set px [file normalize $px]} path add $px + if {$major == 8} continue + set p [file join $pa tcl8] + for {set n 7} {$n >= 0} {incr n -1} { + set px [file join $p 8.${n}] + if {![interp issafe]} {set px [file normalize $px]} + path add $px + } + set px [file join $p site-tcl] + if {![interp issafe]} {set px [file normalize $px]} + path add $px } return } |