summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-09-26 19:54:56 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-09-26 19:54:56 (GMT)
commit030aaf8733e03063daa3c730c5b258575b9386ba (patch)
tree5ed68f5145215b594f13c8ca19970b476d33002b /library
parented14e02fc83fc5a7dab826db93ce7e2d4e276a96 (diff)
downloadtcl-030aaf8733e03063daa3c730c5b258575b9386ba.zip
tcl-030aaf8733e03063daa3c730c5b258575b9386ba.tar.gz
tcl-030aaf8733e03063daa3c730c5b258575b9386ba.tar.bz2
TIP #323 IMPLEMENTATION (partial)
* doc/tm.n: Revise [tcl::tm::path add] and * library/tm.tcl: [tcl::tm::path remove] to accept zero paths. * tests/tm.test:
Diffstat (limited to 'library')
-rw-r--r--library/tm.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index 4f8e09e..a58b2ea 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -79,7 +79,7 @@ namespace eval ::tcl::tm {
# paths to search for Tcl Modules. The subcommand 'list' has no
# sideeffects.
-proc ::tcl::tm::add {path args} {
+proc ::tcl::tm::add {args} {
# PART OF THE ::tcl::tm::path ENSEMBLE
#
# The path is added at the head to the list of module paths.
@@ -102,7 +102,7 @@ proc ::tcl::tm::add {path args} {
# paths to the official state var.
set newpaths $paths
- foreach p [linsert $args 0 $path] {
+ foreach p $args {
if {$p in $newpaths} {
# Ignore a path already on the list.
continue
@@ -143,7 +143,7 @@ proc ::tcl::tm::add {path args} {
return
}
-proc ::tcl::tm::remove {path args} {
+proc ::tcl::tm::remove {args} {
# PART OF THE ::tcl::tm::path ENSEMBLE
#
# Removes the path from the list of module paths. The command is
@@ -151,7 +151,7 @@ proc ::tcl::tm::remove {path args} {
variable paths
- foreach p [linsert $args 0 $path] {
+ foreach p $args {
set pos [lsearch -exact $paths $p]
if {$pos >= 0} {
set paths [lreplace $paths $pos $pos]