From 495797ceb50a857a033f390b4fc35e2989bd66cd Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 13 Oct 2012 20:28:27 -0400 Subject: [PATCH] Improve formatting of options help given long option names * module/ice-9/boot-9.scm (define-option-interface): When printing options help, e.g. for (read-options 'help), expand the width of the first column by another tab stop, to accommodate option names of up to 23 characters. --- module/ice-9/boot-9.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index cf8252a4a..d679f6eaf 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -2850,8 +2850,11 @@ module '(ice-9 q) '(make-q q-length))}." (lambda (option) (apply (lambda (name value documentation) (display name) - (if (< (string-length (symbol->string name)) 8) - (display #\tab)) + (let ((len (string-length (symbol->string name)))) + (when (< len 16) + (display #\tab) + (when (< len 8) + (display #\tab)))) (display #\tab) (display value) (display #\tab)