From 3a58bd3cb2cc0ea1054547819356aceba4d8ab11 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 4 May 2024 15:42:15 +0100 Subject: [PATCH] defs.m4: Document the behaviour of omitting `KV' apodosis/haeresis args. --- defs.m4 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/defs.m4 b/defs.m4 index 8be119d..8beb3b1 100644 --- a/defs.m4 +++ b/defs.m4 @@ -169,16 +169,17 @@ m4_define(<:LOOKUP_DOMAIN:>, _LOOKUP_ARGS(<:$2:>, <:$3:>)}} \ $3:>) -## KV(key, result) +## KV(key, [result]) ## ## Extract the value of the named KEY in the ${extract ...}-style string in ## the current $value (where it may have been left by `LOOKUP-DOMAIN'). The ## RESULT is a pair {IF-FOUND}{IF-NOT-FOUND}; the former may use $value to ## refer to the value; the latter may be `fail' (not in braces) to force -## expansion failure. +## expansion failure. The default is to expand to the extracted value or +## nothing. m4_define(<:KV:>, <:${extract {$1}{$value}$2}:>) -## DOMKV(key, result) +## DOMKV(key, [result]) ## ## Extract the value of the named KEY in the ${extract ...}-style string in ## $domain_data; see `KV'. -- 2.11.0