http://www.purl.org/tcl/home/man/tcl8.4/TclCmd/tclvars.htm collects the formal reference info for tclvars...
The variables tcl_wordchars and tcl_nonwordchars define what letters are treated as valid for words. The variables are auto-loaded along with the commands they control, such as tcl_endOfWord.
This means that to change the characters that are valid, you must first do something like:
catch {tcl_endOfWord}
After this, you can then do something like:
# We want the same behaviour on Windows as on Unix for double-clicking set tcl_wordchars {[a-zA-Z0-9_]} set tcl_nonwordchars {[^a-zA-Z0-9_]}
See also "Tcl syntax help" and "magic names".