summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-22 13:15:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-22 13:15:21 (GMT)
commit35c8885bad4032db82374bb2f4b1db1ac0839f88 (patch)
treee3822a417e6a9c5a1e5437f5334a484e4c3b8ab0
parent740454d17abd5e8a134601126ac05d0988dbc13f (diff)
downloadtcl-35c8885bad4032db82374bb2f4b1db1ac0839f88.zip
tcl-35c8885bad4032db82374bb2f4b1db1ac0839f88.tar.gz
tcl-35c8885bad4032db82374bb2f4b1db1ac0839f88.tar.bz2
Alternative solution for [f1253530cd]
-rw-r--r--library/word.tcl16
1 files changed, 12 insertions, 4 deletions
diff --git a/library/word.tcl b/library/word.tcl
index b8f34a5..3e4bc3a 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -15,12 +15,20 @@
if {$::tcl_platform(platform) eq "windows"} {
# Windows style - any but a unicode space char
- set ::tcl_wordchars {\S}
- set ::tcl_nonwordchars {\s}
+ if {![info exists ::tcl_wordchars]} {
+ set ::tcl_wordchars {\S}
+ }
+ if {![info exists ::tcl_nonwordchars]} {
+ set ::tcl_nonwordchars {\s}
+ }
} else {
# Motif style - any unicode word char (number, letter, or underscore)
- set ::tcl_wordchars {\w}
- set ::tcl_nonwordchars {\W}
+ if {![info exists ::tcl_wordchars]} {
+ set ::tcl_wordchars {\w}
+ }
+ if {![info exists ::tcl_nonwordchars]} {
+ set ::tcl_nonwordchars {\W}
+ }
}
# Arrange for caches of the real matcher REs to be kept, which enables the REs