From 6056b14d0e098950a6e1a848ac970ee0adc1c0ee Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 17 Mar 2017 06:05:29 -0700 Subject: Document opt function. * txr.1: Add missing description of the opt convenience function for constructing opt-desc structures. --- txr.1 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/txr.1 b/txr.1 index 20186fa0..7510506d 100644 --- a/txr.1 +++ b/txr.1 @@ -45845,6 +45845,44 @@ convenience function is provided for constructing .code opt-desc objects. +.coNP Function @ opt +.synb +.mets (opt < short < long >> [ type <> [ helptext ]]) +.syne +.desc +The +.code opt +function provides a slightly condensed syntax for constructing +an object of type +.codn opt-desc . + +The required arguments +.meta short +and +.meta long +are strings, corresponding to +.code opt-desc +slots of the same name. + +The optional parameter +.meta type +corresponds to the same-named slot and defaults to +.codn :bool . + +The optional parameter +.meta helptext +corresponds to the same-named slot, and defaults to +.code nil +(no help text provided for the option). + +The +.code opt +function follows this equivalence: + +.cblk + (opt a b c d) <--> (new opt-desc short a long b type c helptext d) +.cble + .coNP Structure @ opts .synb .mets (defstruct opts nil -- cgit v1.2.3