From: Andrew Burgess Date: Wed, 22 Dec 2021 16:04:56 +0000 (+0000) Subject: gdb/doc: Remove (...) around guile procedure names in @deffn lines X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8af9b8009b8b8a5ad39d014ef9aab51a8117a520;p=binutils-gdb.git gdb/doc: Remove (...) around guile procedure names in @deffn lines Most guile procedures in the guile.texi file are defined like: @deffn {Scheme Procedure} name arg1 arg2 arg3 But there are two places where we do this: @deffn {Scheme Procedure} (name arg1 arg2 arg3) Notice the added (...). Though this does represent how a procedure call is written in scheme, it's not the normal style throughout the manual. I also checked the 'info guile' info page to see how they wrote there declarations, and they use the first style too. The second style also has the drawback that index entries are added as '(name', and so they are grouped in the '(' section of the index, which is not very user friendly. In this commit I've changed the definitions of make-command and make-parameter to use the first style. The procedure declaration lines can get pretty long with all of the arguments, and this was true for both of the procedures I am changing in this commit. I have made use of a trailing '@' to split the deffn lines, and keep them under 80 characters in the texi source. This makes no difference to how the final document looks. Finally, our current style for keyword arguments, appears to be: [#:keyword-name argument-name] I don't really understand the reason for this, 'info guile' just seems to use: [#:keyword-name] which seems just as good to me. But I don't propose to change that just now. What I do notice though, is that sometimes, texinfo will place a line break between the keyword-name and the argument-name, for example, the pdf of make-command is: make-command name [#:invoke invoke] [#:command-class command-class] [#:completer-class completer] [#:prefix? prefix] [#:doc doc-string] Notice the line break after '#:command-class' and after '#:doc', neither of which are ideal. And so, for the two commands I am changing in this commit, I have made use of @w{...} to prevent line breaks between the keyword-name and the argument-name. Now the pdf looks like this: make-command name [#:invoke invoke] [#:command-class command-class] [#:completer-class completer] [#:prefix? prefix] [#:doc doc-string] Which seems much better. I'll probably update the other deffn lines at some point. --- diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi index 52348aab8f7..c7e367a9ca8 100644 --- a/gdb/doc/guile.texi +++ b/gdb/doc/guile.texi @@ -1727,8 +1727,10 @@ the command to @value{GDBN} from @code{make-command}. There is no support for multi-line commands, that is commands that consist of multiple lines and are terminated with @code{end}. -@c TODO: line length -@deffn {Scheme Procedure} (make-command name @r{[}#:invoke invoke{]} @r{[}#:command-class command-class@r{]} @r{[}#:completer-class completer{]} @r{[}#:prefix? prefix@r{]} @r{[}#:doc doc-string{]}) +@deffn {Scheme Procedure} make-command name @w{@r{[}#:invoke invoke@r{]}} @ + @w{@r{[}#:command-class command-class@r{]}} @ + @w{@r{[}#:completer-class completer@r{]}} @ + @w{@r{[}#:prefix? prefix@r{]}} @w{@r{[}#:doc doc-string@r{]}} The argument @var{name} is the name of the command. If @var{name} consists of multiple words, then the initial words are looked for as prefix @@ -2017,8 +2019,13 @@ the parameter to @value{GDBN} from @code{make-parameter}. Parameters are exposed to the user via the @code{set} and @code{show} commands. @xref{Help}. -@c TODO line length -@deffn {Scheme Procedure} (make-parameter name @r{[}#:command-class command-class@r{]} @r{[}#:parameter-type parameter-type{]} @r{[}#:enum-list enum-list@r{]} @r{[}#:set-func set-func{]} @r{[}#:show-func show-func{]} @r{[}#:doc doc{]} @r{[}#:set-doc set-doc{]} @r{[}#:show-doc show-doc{]} @r{[}#:initial-value initial-value{]}) +@deffn {Scheme Procedure} make-parameter name @ + @w{@r{[}#:command-class command-class@r{]}} @ + @w{@r{[}#:parameter-type parameter-type@r{]}} @ + @w{@r{[}#:enum-list enum-list@r{]}} @w{@r{[}#:set-func set-func@r{]}} @ + @w{@r{[}#:show-func show-func@r{]}} @w{@r{[}#:doc doc@r{]}} @ + @w{@r{[}#:set-doc set-doc@r{]}} @w{@r{[}#:show-doc show-doc@r{]}} @ + @w{@r{[}#:initial-value initial-value@r{]}} The argument @var{name} is the name of the new parameter. If @var{name} consists of multiple words, then the initial words are looked for as prefix