summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-17 11:18:42 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-17 11:18:42 -0800
commit68ca87bc780e25dea1418019161d99727225d1ce (patch)
tree7e4651a1e61db5c2205c518257e9c5bd9355037a /txr.1
parent2668e984caf88abb2bd8d20d50573f23e73aa695 (diff)
downloadtxr-68ca87bc780e25dea1418019161d99727225d1ce.tar.gz
txr-68ca87bc780e25dea1418019161d99727225d1ce.tar.bz2
txr-68ca87bc780e25dea1418019161d99727225d1ce.zip
* match.c (h_fun, v_fun): Bugfix! copy_list should be used for copying
the bindings, not copy_alist. Otherwise functions cannot destructively update a binding, which is useless. We want a function not to manipulate the binding list, but to be able to manipulate the contents of bindings. (match_files_ctx): Declaration moved ahead of match_line. (v_fun): Forward declaration added. (match_line): Allow vertical functions to be called from a horizontal context, in a limited way. * txr.1: Mention the possibility of a call from a horizontal context falling back on a vertical function.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.19
1 files changed, 7 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index ed5832c5..f8197650 100644
--- a/txr.1
+++ b/txr.1
@@ -3021,8 +3021,13 @@ Example:
Output: fun="horizontal"
-A call made in a clearly horizontal context will ignore
-the vertical definition, if any, and require the horizontal function.
+A call made in a clearly horizontal context will prefer the
+horizontal function, and only fall back on the vertical one
+if the horizontal one doesn't exist. (In this fall-back case,
+the vertical function is called with empty data; it is useful
+for calling vertical functions which process arguments and
+produce values.)
+
In the next example, the call is followed by trailing material,
placing it in a horizontal context. Leading material will
do the same thing: