diff options
author | Paul A. Patience <paul@apatience.com> | 2022-02-12 15:38:10 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-12 14:08:28 -0800 |
commit | 17b994a59e1c294292faccefc2a03c36828e5d46 (patch) | |
tree | 365bb5f85f3b23bde4e4d301c91f306de756030a /stdlib/getopts.tl | |
parent | e56d87f41892845ff380e00aa9a42ce55e70eede (diff) | |
download | txr-17b994a59e1c294292faccefc2a03c36828e5d46.tar.gz txr-17b994a59e1c294292faccefc2a03c36828e5d46.tar.bz2 txr-17b994a59e1c294292faccefc2a03c36828e5d46.zip |
getopts: include list/cumul subtypes in legend.
* stdlib/getopts.tl (opthelp-types): Consider list and cumul
types when searching for types to include in the legend.
Diffstat (limited to 'stdlib/getopts.tl')
-rw-r--r-- | stdlib/getopts.tl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stdlib/getopts.tl b/stdlib/getopts.tl index aa6ba4ab..9d39c012 100644 --- a/stdlib/getopts.tl +++ b/stdlib/getopts.tl @@ -368,7 +368,12 @@ (defun opthelp-types (opt-desc-list : (*stdout* *stdout*)) (let ((documented (remove-if (op null @1.helptext) opt-desc-list))) (whenlet ((types (keep-if [andf keywordp (op neq :bool)] - (uniq (mapcar (usl type) documented))))) + (uniq (mapcar (chain (usl type) + (ldo match-ecase + ((@(or list cumul) @type) + @(rec type)) + (@type type))) + documented))))) (put-line "Type legend:\n") (each ((ty types)) (iflet ((ln (caseql ty |