Hi Alexis, At 2023-07-12T13:14:59+0200, Alexis wrote: > reading through the groff(7) manpage I noticed an inconsistency in the > spelling of the \n[lsn] and \n[lss] registers: > > The "Writable predefined registers" section references > > `\n[lsn]` and `\n[lss]` > > whereas the paragraphs under the "Traps" section mention > > `\n[.lsn]` and `\n[.lss]` (notice the leading period `.`)
Yup, that's an error--thanks for catching this!
> A quick grep over the sources and groff.texi reveals several
> occurrences of `lsn` and `lss` yet the period-prefixed variant only
> appears in groff.7.man:
>
> % grep -R 'ls[sn]' src doc/groff.texi
> src/roff/troff/input.cpp: register_dictionary.define("lsn", new
> variable_reg(&leading_spaces_number));
> src/roff/troff/input.cpp: register_dictionary.define("lss", new
> variable_reg(&leading_spaces_space));
That's the source of truth, as it were.
> My current understanding of groff's code base is virtually
> non-existent and I may have missed some crucial aspects and things in
> regards to the aforementioned inconsistency and things are as they
> should be. In that case I'd appreciate pointers that would help me
> understand why the things are the way they are.
No worries, you found a real documentation error and the location in the
source that gives the lie to it.
The error was probably mine when I revised the "Traps" section of our
Texinfo manual and added it to groff(7).
> Otherwise please find attached a patch that removes the leading period
> `.` from the \n[lsn] and \n[lss] registers in the "Traps" section in
> groff.7.man.
Thanks! I'll apply this and it will be in my next push to master.
> diff --git a/man/groff.7.man b/man/groff.7.man
> index 8d8d9bbd0..c35ca0431 100644
> --- a/man/groff.7.man
> +++ b/man/groff.7.man
> @@ -7265,9 +7265,9 @@ page ejection status
> .RB ( \[rs]n[.pe] ),
> and
> leading space count
> -.RB ( \[rs]n[.lsn] )
> +.RB ( \[rs]n[lsn] )
> with its corresponding amount of motion
> -.RB ( \[rs]n[.lss] ).
> +.RB ( \[rs]n[lss] ).
> .
> .
> .\" ====================================================================
Regards,
Branden
signature.asc
Description: PGP signature
