summaryrefslogtreecommitdiffstats
path: root/library/word.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-06-16 16:27:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-06-16 16:27:01 (GMT)
commit3cbd3b2bede59c6fd03330ac014e626a0a776522 (patch)
tree8e125264e32e68a389be074bfb8795cd212b9114 /library/word.tcl
parent95fb48bf07be37ad0717475514d2c444602a0a6c (diff)
parent4fac9b8d0fb5648943635cf4c956c9518e610921 (diff)
downloadtcl-3cbd3b2bede59c6fd03330ac014e626a0a776522.zip
tcl-3cbd3b2bede59c6fd03330ac014e626a0a776522.tar.gz
tcl-3cbd3b2bede59c6fd03330ac014e626a0a776522.tar.bz2
Merge tip of core-8-6-branchbug_16828b3744
Diffstat (limited to 'library/word.tcl')
-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