gbranden pushed a commit to branch master
in repository groff.

commit 833cbbdd431d6b2ffd27eb75d714dafe1214168c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Apr 3 21:01:43 2025 -0500

    [doc,man]: Correct description of "copy mode".
    
    * Fix incorrect claim: an escaped newline is not "interpreted
      immediately", but encoded.
    * Lead description with the largest class of transformations, which is
      of course the identity transformation on characters.  Ordinary,
      special, and indexed characters (the latter two being varieties of
      escape sequence) are stored as-is, and are not members of the class
      "all other escape sequence".
    * Itemize all of the escape sequences that get specially encoded.
    
    Align input line breaks between Texinfo and man page.
---
 doc/groff.texi.in | 78 +++++++++++++++++++++++++++++++++++++++++++++----------
 man/groff.7.man   | 60 +++++++++++++++++++++++++++++++-----------
 2 files changed, 110 insertions(+), 28 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 4a4dd6b2f..080b81c11 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -464,7 +464,7 @@ Documentation License''.
 @title groff
 @subtitle The GNU implementation of @code{troff}
 @subtitle version @VERSION@
-@subtitle March 2025
+@subtitle April 2025
 @author Trent@tie{}A.@: Fisher
 @author Werner Lemberg
 @author G.@tie{}Branden Robinson
@@ -14086,18 +14086,70 @@ Applying string interpolation to a macro does not 
change this name.
 @cindex mode, copy
 @cindex mode, copy
 
-GNU @code{troff} processes certain requests in @dfn{copy mode}: it
-interpolates the escape sequences @code{\n}, @code{\g}, @code{\$},
-@code{\*}, @code{\V}, and @code{\?} normally; interprets
-@code{\@key{RET}} immediately; discards comments @code{\"} and
-@code{\#}; interpolates the current leader, escape, or tab character
-with @code{\a}, @code{\e}, and @code{\t}, respectively; and represents
-all other escape sequences in an encoded form.  The term ``copy mode''
-reflects its most visible application in requests that populate macros
-and strings, but other requests also use it when interpreting arguments
-that can't meaningfully represent typesetting operations.  For example,
-a font selection escape sequence has no meaning in a hyphenation pattern
-file name (@code{hpf}) or a diagnostic message written to the terminal
+GNU
+@code{troff}
+processes certain requests in
+@dfn{copy mode}:@:
+it copies ordinary,
+special,
+and indexed characters as-is;
+interpolates the escape sequences
+@code{\n},
+@code{\g},
+@code{\$},
+@code{\*},
+@code{\V},
+and
+@code{\?}
+normally;
+discards comments
+@code{\"}
+and
+@code{\#};
+interpolates
+@code{\a},
+@code{\e},
+and
+@code{\t},
+as the current
+leader,
+escape,
+or
+tab
+character,
+respectively;
+represents
+@c see src/roff/troff/input.h
+@code{\RET},
+@code{\&},
+@code{\_},
+@code{\|},
+@code{\^},
+@code{\@{},
+@code{\@}},
+@code{\`},
+@code{\'},
+@code{\-},
+@code{\!},
+@code{\c},
+@code{\%},
+@code{\SPC},
+@code{\E},
+@code{\)},
+@code{\~},
+and
+@code{\:}
+in an encoded form,
+and copies other escape sequences as-is.
+The term ``copy mode'' reflects its most visible application
+in requests that populate macros and strings,
+but other requests also use it when interpreting arguments
+that can't meaningfully represent typesetting operations.
+For example,
+a font selection escape sequence has no meaning
+in a hyphenation pattern file name
+(@code{hpf})
+or a diagnostic message written to the terminal
 (@code{tm}).
 
 @cindex interpretation mode
diff --git a/man/groff.7.man b/man/groff.7.man
index f54fd5163..f5f11dad2 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -7793,10 +7793,14 @@ Applying string interpolation to a macro does not 
change this name.
 .SS "Copy mode"
 .\" ====================================================================
 .
-.I @g@troff
+GNU
+.I troff \" GNU
 processes certain requests in
 .I "copy mode:"
-it interpolates the escape sequences
+it copies ordinary,
+special,
+and indexed characters as-is;
+interpolates the escape sequences
 .BR \[rs]n ,
 .BR \[rs]g ,
 .BR \[rs]$ ,
@@ -7805,29 +7809,55 @@ it interpolates the escape sequences
 and
 .B \[rs]?\&
 normally;
-interprets
-.BI \[rs] newline
-immediately;
 discards comments
 .B \[rs]"
 and
 .BR \[rs]# ;
-interpolates the current leader,
-escape,
-or tab character with
+interpolates
 .BR \[rs]a ,
 .BR \[rs]e ,
 and
 .BR \[rs]t ,
+as the current
+leader,
+escape,
+or
+tab
+character with
 respectively;
-and represents all other escape sequences in an encoded form.
-The term \[lq]copy mode\[rq] reflects its most visible application in
-requests that populate macros and strings,
-but other requests also use it when interpreting arguments that can't
-meaningfully represent typesetting operations.
+represents
+.\" see src/roff/troff/input.h
+.BI \[rs] newline \c
+,
+.BR \[rs]& ,
+.BR \[rs]_ ,
+.BR \[rs]| ,
+.BR \[rs]\[ha] ,
+.BR \[rs]{ ,
+.BR \[rs]} ,
+.BR \[rs]\[ga] ,
+.BR \[rs]\[aq] ,
+.BR \[rs]\- ,
+.BR \[rs]! ,
+.BR \[rs]c ,
+.BR \[rs]% ,
+.BI \[rs] space \c
+,
+.BR \[rs]E ,
+.BR \[rs]) ,
+.BR \[rs]\[ti] ,
+and
+.B \[rs]:
+in an encoded form,
+and copies other escape sequences as-is.
+.
+The term \[lq]copy mode\[rq] reflects its most visible application
+in requests that populate macros and strings,
+but other requests also use it when interpreting arguments
+that can't meaningfully represent typesetting operations.
 For example,
-a font selection escape sequence has no meaning in a hyphenation pattern
-file name
+a font selection escape sequence has no meaning
+in a hyphenation pattern file name
 .RB ( hpf )
 or a diagnostic message written to the terminal
 .RB ( tm ).

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to