summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-03-21 21:28:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-03-21 21:28:42 (GMT)
commitaddefaba01a0a32c7659cd2ae09bd805957cc800 (patch)
treebea7a5568c41a8c828ee9dd833177a77325d2622 /unix
parenta284f6ce98ab3ba17bfef4ba1216feac2c720633 (diff)
downloadtcl-addefaba01a0a32c7659cd2ae09bd805957cc800.zip
tcl-addefaba01a0a32c7659cd2ae09bd805957cc800.tar.gz
tcl-addefaba01a0a32c7659cd2ae09bd805957cc800.tar.bz2
Fixed bug [f1253530cd] - tcl_wordchars and tcl_nonwordchars are unknown at startup
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 5fc0035..1551e79 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -738,8 +738,8 @@ Tcl_GetEncodingNameFromEnvironment(
* None.
*
* Side effects:
- * Sets "tclDefaultLibrary", "tcl_pkgPath", and "tcl_platform" Tcl
- * variables.
+ * Sets "tclDefaultLibrary", "tcl_pkgPath", "tcl_platform",
+ * "tcl_wordchars" and "tcl_nonwordchars" Tcl variables.
*
*----------------------------------------------------------------------
*/
@@ -973,6 +973,14 @@ TclpSetVariables(
*/
Tcl_SetVar2(interp, "tcl_platform","pathSeparator", ":", TCL_GLOBAL_ONLY);
+
+ /*
+ * Define the tcl_wordchars and tcl_nonwordchars regexps
+ * Motif style: any unicode word char (number, letter, or underscore)
+ */
+
+ Tcl_SetVar(interp, "tcl_wordchars", "\\w", TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "tcl_nonwordchars", "\\W", TCL_GLOBAL_ONLY);
}
/*