Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-10-23
13:41 • Closed ticket [f88bc5ff88]: tcl_wordchars and tcl_nonwordchars plus 5 other ... artifact: 534cf3ea9f user: jan.nijtmans
2024-10-18
19:08 • Pending ticket [f88bc5ff88]. artifact: f24672c0eb user: jan.nijtmans
19:05
tcl_wordchars and tcl_nonwordchars doc fix proposal. See [f88bc5ff88] closed check-in: b2eab2cc8e user: jan.nijtmans tags: bug-f88bc5ff88
16:57 • Ticket [f88bc5ff88] tcl_wordchars and tcl_nonwordchars status still Open wit... artifact: 137e2c9b6c user: jan.nijtmans
15:38 • Ticket [f88bc5ff88]: 3 changes artifact: 67c04ba39b user: jan.nijtmans
2024-10-17
14:39 • New ticket [f88bc5ff88]. artifact: a2cc26661f user: apnadkarni

tcl_wordchars and tcl_nonwordchars

Closed / Fixedf88bc5ff886393242da3b4d4e9dd775b3152ee0dCreated 2 years agoUpdated 2 years ago
Descriptionmarkdown2024-10-17 14:39:39

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?

Referenced by1
jan.nijtmanswiki2024-10-18 15:38:15

> 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

jan.nijtmanswiki2024-10-18 16:57:35

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

jan.nijtmanswiki2024-10-18 19:08:07

Proposed doc fix [here]

jan.nijtmanswiki2024-10-23 13:41:03

Hopefully, the documentation is more clear now.

Log in (anonymous is fine) to add a comment.