there are a few cases, where {expand} *without* trailer is
misinterpreted to expand to nothing:
in interactive tclsh8.5 shell:
% list {expand}
% list {expand};
% if 1 {list {expand};}
%
(all return the empty string, instead of the string "expand")
However
% if 1 {list {expand}}
expand
%
works correctly.
It looks like the code that checks the next character after
the {expand} deals with too few cases.
Logged In: YES
user_id=830354
another failing case (also in interactive shell):
% list {expand}\ whatever else
whatever else
%
(since \-newline-anywhitespace should be treated as one single
whitespace, the {expand}-semantics shouldn't trigger.
This might be more difficult to fix than the previous cases :-(
Logged In: YES
user_id=80530
Attached patch fixes bug
and adds tests.
Committing to HEAD...