tcl_wordchars and tcl_nonwordchars
tcl_wordchars and tcl-nonwordchars are documented in the tclvars manpage. However,
% set tcl_wordchars
can't read "tcl_wordchars": no such variable
Does some package have to be loaded in order for these to be available (by word.tcl being sourced) in which case that should be documented? Or are they to be removed from the documentation?
As a follow-on, why does their definition (as per the manpage) differ between Windows and Unix?
b2eab2cc8etcl_wordchars and tcl_nonwordchars doc fix proposal. See [f88bc5ff88] check-in2024-10-18 19:05:48
> Does some package have to be loaded in order for these to be available
No. The idea is: if you want to change those, just do:
set ::tcl_wordchars {\w}
set ::tcl_nonwordchars {\W}
::tcl::UpdateWordBreakREs
Why would you want to do that?
I don't see the function ::tcl::UpdateWordBreakREs documented anywhere
> As a follow-on, why does their definition (as per the manpage) differ between Windows and Unix?
That's not true any more, since [this] commit. Aparently, the documentation was never adapted
Actually, it's not even needed to document ::tcl::UpdateWordBreakREs. As soon as any of the wordchar functions is called, tcl_library/word.tcl is loaded and ::tcl::UpdateWordBreakREs is executed. Nothing special needs to be done.
So, the only thing that needs to be done is fix the documentation regarding the difference between Windows and UNIX: There is no difference any more
Proposed doc fix [here]
Hopefully, the documentation is more clear now.