1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

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.
This commit is contained in:
Mark H Weaver 2012-10-13 20:28:27 -04:00
parent f865ffaab1
commit 495797ceb5

View file

@ -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)