* Migrate email addresses to use `MT` and `ME` macros.
* Migrate URLs to use `UR` and `UE` macros.
* Several other *roffs not support these 16 year old groff extensions.
  However, old systems like Solaris 10 troff (still not end-of-lifed) do
  not.  Accommodate them.
  + Copy extension macro definitions from groff's "an-ext.tmac" file.
  + Define page-local versions of the extension macros only if the
    formatter does not claim groff compatibility (does not define the
    `.g` register to a positive value).
  + Define a string `:` that expands to nothing on non-groff formatters,
    and to the GNU troff `\:` escape sequence extension.  This escape
    sequence is necessary to format lengthy file names, URLs, and
    similar without either oversetting the line or hyphenating them.
---
 doc/bash.1                  | 67 +++++++++++++++++++++++++++++++------
 lib/readline/doc/history.3  | 49 ++++++++++++++++++++++++---
 lib/readline/doc/readline.3 | 49 ++++++++++++++++++++++++---
 3 files changed, 147 insertions(+), 18 deletions(-)

diff --git a/doc/bash.1 b/doc/bash.1
index 67158cbd..883b1454 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -19,6 +19,7 @@
 .\" Ensure the macros/strings are initialized to avoid groff warnings.
 .ds zZ \" empty
 .ds zY \" empty
+.ds zX \" empty
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
 .TH BASH 1 "2025 September 24" "GNU Bash 5.3"
@@ -28,6 +29,7 @@
 .ds " \(dq
 .ds ^ \(ha
 .ds ~ \(ti
+.ds : \:\" hyphenless break point (e.g., for long file names and URLs)
 .\}
 .el \{\
 .ds ' '
@@ -35,6 +37,7 @@
 .ds " ""\" two adjacent quotes and no space before this comment
 .ds ^ ^
 .ds ~ ~
+.ds : \" empty
 .\}
 .
 .\" File Name macro.  This used to be `.PN', for Path Name,
@@ -63,6 +66,43 @@
 .  if n \%"\\$1"\\$2
 .\}
 ..
+.if \n(.g .ig zX
+.\" The following macro definitions are from groff's "an-ext.tmac".
+.
+.\" Prepare link text for mail/web hyperlinks.  `MT` and `UR` call this.
+.de mV
+.  ds mU \\$1\"
+..
+.\" Emit hyperlink.  The optional argument supplies trailing punctuation
+.\" after link text.  `ME` and `UE` call this.
+.de mQ
+.  mY
+.  nh
+<\\*(mU>\\$1
+.  hy \\n(mH
+.  rm mU
+..
+.\" Start URL.
+.\" .UR url
+.de UR
+.  mV \\$1
+..
+.\" End URL.
+.\" .UE [punctuation]
+.de UE
+.  mQ \\$1
+..
+.\" Start email address.
+.\" .MT address
+.de MT
+.  mV \\$1
+..
+.\" End email address.
+.\" .ME [punctuation]
+.de ME
+.  mQ \\$1
+..
+.zX
 .SH NAME
 bash \- GNU Bourne-Again SHell
 .SH SYNOPSIS
@@ -13450,8 +13490,9 @@ .SH "SEE ALSO"
 .TP
 \fIThe GNU History Library\fP, Brian Fox and Chet Ramey
 .TP
+.UR http://pubs.opengroup.org/onlinepubs/9799919799/
 POSIX.1-2024, The IEEE and The Open Group
-http://pubs.opengroup.org/onlinepubs/9799919799/
+.UE
 .TP
 http://tiswww.case.edu/\*~chet/bash/POSIX
 a description of posix mode
@@ -13488,14 +13529,13 @@ .SH FILES
 Individual \fIreadline\fP initialization file
 .PD
 .SH AUTHORS
+.MT bfox@\*:gnu\*:.org
 Brian Fox, Free Software Foundation
-.br
[email protected]
+.ME
 .PP
+.MT chet\*:.ramey@\*:case\*:.edu
 Chet Ramey, Case Western Reserve University
-.br
[email protected]
-.SH BUG REPORTS
+.ME
 .SH "BUG REPORTS"
 If you find a bug in
 .BR bash ,
@@ -13504,8 +13544,12 @@ .SH "BUG REPORTS"
 version of
 .BR bash .
 The latest version is always available from
-\fIftp://ftp.gnu.org/pub/gnu/bash/\fP and
-\fIhttp://git.savannah.gnu.org/cgit/bash.git/snapshot/bash\-master.tar.gz\fP.
+.UR ftp://\*:ftp.gnu.org/\*:pub/\*:gnu/\*:bash/
+.UE
+and
+.UR http://\*:git\*:.savannah\*:.gnu\*:.org/\*:cgit/\*:bash\*:.git/\
+\*:snapshot/\*:bash\-master\*:.tar.\*:gz
+.UE .
 .PP
 Once you have determined that a bug actually exists, use the
 .I bashbug
@@ -13513,10 +13557,13 @@ .SH "BUG REPORTS"
 If you have a fix, you are encouraged to mail that as well!
 You may send suggestions and
 .Q philosophical
-bug reports to \fIbug\[email protected]\fP or post them to the
+bug reports to
+.MT bug\-bash@\*:gnu\*:.org
+.ME
+or post them to the
 .SM USENET
 newsgroup
-.BR gnu.bash.bug .
+.BR gnu\*:.bash\*:.bug .
 .PP
 .I All
 bug reports should include:
diff --git a/lib/readline/doc/history.3 b/lib/readline/doc/history.3
index 3232c15a..90952d5e 100644
--- a/lib/readline/doc/history.3
+++ b/lib/readline/doc/history.3
@@ -9,12 +9,15 @@
 .\"    Last Change: Tue Dec 31 13:35:52 EST 2024
 .\"
 .TH HISTORY 3 "2024 December 31" "GNU History 8.3"
+.\" Ensure this string is initialized to avoid groff warnings.
+.ds zX \" empty
 .\"
 .ie \n(.g \{\
 .ds ' \(aq
 .ds " \(dq
 .ds ^ \(ha
 .ds ~ \(ti
+.ds : \:\" hyphenless break point (e.g., for long file names and URLs)
 .\}
 .el \{\
 .ds ' '
@@ -22,6 +25,7 @@
 .ds " ""\" two adjacent quotes and no space before this comment
 .ds ^ ^
 .ds ~ ~
+.ds : \" empty
 .\}
 .
 .\" Fix broken EX/EE macros on DWB troff.
@@ -76,6 +80,43 @@
 \fI\\$1\fP \fB\\$2\fP
 .br
 ..
+.if \n(.g .ig zX
+.\" The following macro definitions are from groff's "an-ext.tmac".
+.
+.\" Prepare link text for mail/web hyperlinks.  `MT` and `UR` call this.
+.de mV
+.  ds mU \\$1\"
+..
+.\" Emit hyperlink.  The optional argument supplies trailing punctuation
+.\" after link text.  `ME` and `UE` call this.
+.de mQ
+.  mY
+.  nh
+<\\*(mU>\\$1
+.  hy \\n(mH
+.  rm mU
+..
+.\" Start URL.
+.\" .UR url
+.de UR
+.  mV \\$1
+..
+.\" End URL.
+.\" .UE [punctuation]
+.de UE
+.  mQ \\$1
+..
+.\" Start email address.
+.\" .MT address
+.de MT
+.  mV \\$1
+..
+.\" End email address.
+.\" .ME [punctuation]
+.de ME
+.  mQ \\$1
+..
+.zX
 .SH NAME
 history \- GNU History Library
 .SH COPYRIGHT
@@ -768,13 +809,13 @@ .SH "SEE ALSO"
 \fIreadline\fP(3)
 .PD
 .SH AUTHORS
+.MT bfox@\*:gnu\*:.org
 Brian Fox, Free Software Foundation
-.br
[email protected]
+.ME
 .PP
+.MT chet\*:.ramey@\*:case\*:.edu
 Chet Ramey, Case Western Reserve University
-.br
[email protected]
+.ME
 .SH "BUG REPORTS"
 If you find a bug in the
 .B history
diff --git a/lib/readline/doc/readline.3 b/lib/readline/doc/readline.3
index 0083cc38..18b34477 100644
--- a/lib/readline/doc/readline.3
+++ b/lib/readline/doc/readline.3
@@ -9,12 +9,15 @@
 .\"    Last Change: Tue Jul 15 10:19:29 EDT 2025
 .\"
 .TH READLINE 3 "2024 July 15" "GNU Readline 8.3"
+.\" Ensure this string is initialized to avoid groff warnings.
+.ds zX \" empty
 .\"
 .ie \n(.g \{\
 .ds ' \(aq
 .ds " \(dq
 .ds ^ \(ha
 .ds ~ \(ti
+.ds : \:\" hyphenless break point (e.g., for long file names and URLs)
 .\}
 .el \{\
 .ds ' '
@@ -22,6 +25,7 @@
 .ds " ""\" two adjacent quotes and no space before this comment
 .ds ^ ^
 .ds ~ ~
+.ds : \" empty
 .\}
 .
 .\" File Name macro.  This used to be `.PN', for Path Name,
@@ -42,6 +46,43 @@
 .  if n "\\$1"\\$2
 .\}
 ..
+.if \n(.g .ig zX
+.\" The following macro definitions are from groff's "an-ext.tmac".
+.
+.\" Prepare link text for mail/web hyperlinks.  `MT` and `UR` call this.
+.de mV
+.  ds mU \\$1\"
+..
+.\" Emit hyperlink.  The optional argument supplies trailing punctuation
+.\" after link text.  `ME` and `UE` call this.
+.de mQ
+.  mY
+.  nh
+<\\*(mU>\\$1
+.  hy \\n(mH
+.  rm mU
+..
+.\" Start URL.
+.\" .UR url
+.de UR
+.  mV \\$1
+..
+.\" End URL.
+.\" .UE [punctuation]
+.de UE
+.  mQ \\$1
+..
+.\" Start email address.
+.\" .MT address
+.de MT
+.  mV \\$1
+..
+.\" End email address.
+.\" .ME [punctuation]
+.de ME
+.  mQ \\$1
+..
+.zX
 .SH NAME
 readline \- get a line from a user with editing
 .SH SYNOPSIS
@@ -1858,13 +1899,13 @@ .SH FILES
 Individual \fBreadline\fP initialization file
 .PD
 .SH AUTHORS
+.MT bfox@\*:gnu\*:.org
 Brian Fox, Free Software Foundation
-.br
[email protected]
+.ME
 .PP
+.MT chet\*:.ramey@\*:case\*:.edu
 Chet Ramey, Case Western Reserve University
-.br
[email protected]
+.ME
 .SH "BUG REPORTS"
 If you find a bug in
 .BR readline ,
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to