diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-03-22 21:18:53 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-03-22 21:18:53 -0700 |
commit | b629707890bf3f527f1d33a17815ef214ee6dc39 (patch) | |
tree | 79d9a5f5c52fff06cb3241a4c8ccf7c518eb063b /txr.1 | |
parent | 7635fc2cf9c07850a8a0ffc94818bf869794435b (diff) | |
download | txr-b629707890bf3f527f1d33a17815ef214ee6dc39.tar.gz txr-b629707890bf3f527f1d33a17815ef214ee6dc39.tar.bz2 txr-b629707890bf3f527f1d33a17815ef214ee6dc39.zip |
Bind variable during directive delimited match.
The existing behavior is: when a situation like @a@(foo)
performs a search for the match for @(foo) in order to
determine the extent of the text matched by variable a, the
variable a is not bound. That is to say, @(foo) is tried in an
environment in which a doesn't exist. The variable is only
bound when the search succeeds, and then @(foo) is processed
again, with the variable now available.
The new behavior is that @(foo) is tested in an environment
in which a is bound. The variable's value is bound to the
range of text between the original position and the tested
position where @(foo) is tried.
This is subject to the copatibility option.
* match.c (ml_bindings_specline_pos): New static function.
(search_match_binding_var): New static function, variant of
search_match.
(h_var): In the var-delimited-by-directive case, perform
the search using search_match_binding_var, unless <= 172
compatibility is requested.
* txr.1: Compatibility note added.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -53114,6 +53114,17 @@ of these version values, the described behaviors are provided if is given an argument which is equal or lower. For instance .code "-C 103" selects the behaviors described below for version 105, but not those for 102. +.IP 172 +A value of 172 or lower restores a behavior of the \*(TX pattern +matching language when matching a variable followed by a directive, such as +.codn "@a@(fun b)" . +The old behavior is that the scan for a match for the directive +takes place in an environment in which a binding for +.code a +has not yet been established. The new behavior is that the variable +is always bound prior to the processing of the directive. During +the search, it is bound to the range of text spanning between the +starting position and the position being tried. .IP 170 A value of 170 or lower disables the behavior that \*(TX scans standard input when no input sources are specified on the command line. Standard input must |