[PATCH] Fix help option parsing
Pietro Monteiro
pietro@sociotechnical.xyz
Thu Apr 3 15:58:33 GMT 2025
Running `guile -l ../cgen/guile.scm -s ../cgen/cgen-opc.scm --help' fails to
display the application specific options.
The app options use a lambda which can't be `string-append'ed. So non-string
objects on the args list.
This also fix `cgen-opc.scm' and I imagine the other applications too.
Signed-off-by: Pietro Monteiro <pietro@sociotechnical.xyz>
---
read.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/read.scm b/read.scm
index 392e7ba..5b5548b 100644
--- a/read.scm
+++ b/read.scm
@@ -1143,9 +1143,11 @@ Define a preprocessor-style macro.
" - " (caddr arg)
(apply string-append
(map (lambda (text)
- (string-append "\n"
- (string-take 20 "")
- text))
+ (if (string? text)
+ (string-append "\n"
+ (string-take 20 "")
+ text)
+ ""))
(cdddr arg)))
"\n")
cep))
--
2.47.0
More information about the Cgen
mailing list