diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-03-18 17:41:59 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-03-18 17:41:59 (GMT) |
commit | 38a014652e47c230d1fbd41569a36157eb4275f3 (patch) | |
tree | 2250e7f11bc819a3e31e7c9fee66a5898fee1380 | |
parent | 4f1829bfd93b5dfb436ae65e02ee85b029d82315 (diff) | |
download | tcl-38a014652e47c230d1fbd41569a36157eb4275f3.zip tcl-38a014652e47c230d1fbd41569a36157eb4275f3.tar.gz tcl-38a014652e47c230d1fbd41569a36157eb4275f3.tar.bz2 |
* library/tm.tcl (::tcl::tm::Defaults): Modified handling of
environment variables. See [Bug 1914604]. Solution slightly
different than proposed in the report. Using the underscored
form TCLX_y_TM_PATH even if TCLX.y_TM_PATH exists. Also using a
loop to cut prevent code replication.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | library/tm.tcl | 7 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,11 @@ +2008-03-18 Andreas Kupries <andreask@activestate.com> + + * library/tm.tcl (::tcl::tm::Defaults): Modified handling of + environment variables. See [Bug 1914604]. Solution slightly + different than proposed in the report. Using the underscored + form TCLX_y_TM_PATH even if TCLX.y_TM_PATH exists. Also using a + loop to cut prevent code replication. + 2008-03-16 Donal K. Fellows <dkf@users.sf.net> * generic/tclCompCmds.c (TclCompileDictForCmd): Correct the handling diff --git a/library/tm.tcl b/library/tm.tcl index 8fac14a..90692d2 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -321,8 +321,11 @@ proc ::tcl::tm::Defaults {} { set sep ":" } for {set n $minor} {$n >= 0} {incr n -1} { - set ev TCL${major}.${n}_TM_PATH - if {[info exists env($ev)]} { + foreach ev [list \ + TCL${major}.${n}_TM_PATH \ + TCL${major}_${n}_TM_PATH \ + ] { + if {![info exists env($ev)]} continue foreach p [split $env($ev) $sep] { path add $p } |