[ltk-user] patch for unescaped values
In general this in a format string is a code-smell: "{~A}" it nearly always means that a value isn't properly escaped. Note that even (format-wish "{~A}" (tkescape foo)) will fail for a string that ends with a backslash. I'm pretty sure that I can come up with code to break every single change I made. I used my own escape function as a format specifier just because I find it clearer and less error-prone to have all the escaping in the format string. with tkescape2, you need to surrond the corresponding ~a with dquotes (e.g. (format-wish "\"~a\"" (tkescape2 foo)) is correct but (format-wish "~a" (tkescape foo) and (format-wish "\"~a\"" foo) are both wrong) I found this originally in the setf for text, and the setf for listboxes. When I found the same bug in two places I figured it was a good idea to look for more. -Jason
participants (1)
-
Jason Miller