Tk Source Code

Check-in [7b80bfa5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [d5d7f548bd]: option readfile handles backslash-space and backslash-tab as in the X11 resource file syntax.

Replace "\ " and "\<tab>" anywhere in the value again, as Xlib does, instead of only one at the start (the special case added for [766ef52f31]). Values which contain backslashes, like Tcl lists, must be escaped when written to the file; this is now documented. Octal escapes accept only octal digits.

Downloads: See separate download page
Timelines: family | ancestors | descendants | both | option-readfile-x11-escapes
Files: files | file ages | folders
SHA3-256: 7b80bfa5468c3a2965a415fcf13835f425037a0a78616727de3d6c230fc1a675
User & Date: serhiy.storchaka 2026-09-25 09:00:59.993
References
2026-09-25
09:03 • Ticket [766ef52f] option readfile loses list structure status still Open with 3 other changes artifact: b2def940 user: serhiy.storchaka
09:03 • Ticket [d5d7f548] Tk option readfile fails to properly handle \tab in resource files status still Open with 3 other changes artifact: db53a8f4 user: serhiy.storchaka
Context
2026-09-28
11:46
Fix [d5d7f548bd]: option readfile handles backslash-space and backslash-tab as in the X11 resource file syntax check-in: 1b3c3c45 user: jan.nijtmans tags: trunk, main
2026-09-25
09:00
Fix [d5d7f548bd]: option readfile handles backslash-space and backslash-tab as in the X11 resource file syntax.

Replace "\ " and "\<tab>" anywhere in the value again, as Xlib does, instead of only one at the start (the special case added for [766ef52f31]). Values which contain backslashes, like Tcl lists, must be escaped when written to the file; this is now documented. Octal escapes accept only octal digits. closed check-in: 7b80bfa5 user: serhiy.storchaka tags: option-readfile-x11-escapes

06:59
Fix [7ca431c997]: MS-Win: tk_getOpenFile and tk_getSaveFile leak memory when -initialfile is given more than once check-in: ec1a14ce user: jan.nijtmans tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to doc/option.n.
Changes to generic/tkOption.c.
Changes to tests/option.test.