[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 15/30: [man]: Rename internal strings and registers.
From: |
G. Branden Robinson |
Subject: |
[groff] 15/30: [man]: Rename internal strings and registers. |
Date: |
Sat, 12 Oct 2024 12:07:52 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 7e108461d5a182b44e209115f661eb6d329b6e42
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Oct 11 11:11:13 2024 -0500
[man]: Rename internal strings and registers.
* tmac/an.tmac: Rename internal strings and registers.
`an*topic` -> `an*ident`
`an*topic-abbv` -> `an*ident-abbv`
`an*topic-string` -> `an*ident-string`
`an*topic-length` -> `an*ident-length`
`an*topic-length-prev` -> `an*ident-length-prev`
`an*topic-style` -> `an*ident-style`
---
ChangeLog | 10 ++++++++++
tmac/an.tmac | 54 +++++++++++++++++++++++++++---------------------------
2 files changed, 37 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d8f7f44dc..f54e8b59d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-11 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * tmac/an.tmac: Rename internal strings and registers.
+ `an*topic` -> `an*ident`
+ `an*topic-abbv` -> `an*ident-abbv`
+ `an*topic-string` -> `an*ident-string`
+ `an*topic-length` -> `an*ident-length`
+ `an*topic-length-prev` -> `an*ident-length-prev`
+ `an*topic-style` -> `an*ident-style`
+
2024-10-11 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/devices/grops/psrm.cpp (read_uint_arg): When complaining
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 5b9e0c796..bcd243416 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -320,8 +320,8 @@
. nr an*is-in-example 0
. nr an*is-in-link-text-diversion 0
.
-. ds an*topic "\\$1\"
-. if \\n[CT] .stringup an*topic
+. ds an*ident "\\$1\"
+. if \\n[CT] .stringup an*ident
. ds an*section "\\$2\"
. ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
. el \{\
@@ -378,7 +378,7 @@
. \" HTML gets the topic without any abbreviation, since it's metadata.
. if \\n[an*is-output-html] \{\
. DEVTAG-TL
-. nop \\*[an*topic]
+. nop \\*[an*ident]
. DEVTAG-EO-TL
. \}
.
@@ -484,51 +484,51 @@
.
.\" Abbreviate the page topic if it's too long for the header. Leaves
.\" string an-pageref defined for use in .PT and .an-footer. Also
-.\" leaves an*topic-abbv for possible use by .PT and .BT re-definers.
+.\" leaves an*ident-abbv for possible use by .PT and .BT re-definers.
.\" Call this only from within the header/footer environment.
.de an*abbreviate-page-topic
-. ds an*topic-abbv \\*[an*topic]\" might not get abbreviated at all
-. ds an*topic-string \\*[an*topic]\"
+. ds an*ident-abbv \\*[an*ident]\" might not get abbreviated at all
+. ds an*ident-string \\*[an*ident]\"
. ds an-ellipsis \|.\|.\|.\|\"
. \" an*page-ref-string is left unmodified for internal use, such as
. \" PDF bookmarks.
-. ds an*page-ref-string \\*[an*topic](\\*[an*section])\"
-. ds an-pageref \\*[an*topic-abbv](\\*[an*section])\"
+. ds an*page-ref-string \\*[an*ident](\\*[an*section])\"
+. ds an-pageref \\*[an*ident-abbv](\\*[an*section])\"
. nr an-header-width \\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]'
. while (\\n[an-header-width] >= \\n[.lt]) \{\
. \" The page topic is too long; trim some bits out of the middle.
-. length an*topic-length \\*[an*topic-string]
+. length an*ident-length \\*[an*ident-string]
. \" roff uses truncating division. Remove an additional character
. \" on each side of the midpoint to account for the ellipsis we add
. \" later.
-. nr an-mark1 (\\n[an*topic-length] / 2 - 2)
-. nr an-mark2 (\\n[an*topic-length] / 2 + 2)
-. ds an-prefix \\*[an*topic-string]\"
-. ds an-suffix \\*[an*topic-string]\"
+. nr an-mark1 (\\n[an*ident-length] / 2 - 2)
+. nr an-mark2 (\\n[an*ident-length] / 2 + 2)
+. ds an-prefix \\*[an*ident-string]\"
+. ds an-suffix \\*[an*ident-string]\"
. \" Use extremum operators to ensure that the first and last
. \" characters of the topic remain intact (in cases of pathological
. \" shortening).
. substring an-prefix 0 (\\n[an-mark1] >? 1)
-. substring an-suffix (\\n[an-mark2] <? \\n[an*topic-length] - 1) -1
-. ds an*topic-string \\*[an-prefix]\\*[an-suffix]\"
-. ds an*topic-abbv \\*[an-prefix]\\*[an-ellipsis]\\*[an-suffix]\"
+. substring an-suffix (\\n[an-mark2] <? \\n[an*ident-length] - 1) -1
+. ds an*ident-string \\*[an-prefix]\\*[an-suffix]\"
+. ds an*ident-abbv \\*[an-prefix]\\*[an-ellipsis]\\*[an-suffix]\"
. \" Remeasure the formatted topic; give up if we made no progress.
-. length an*topic-new-length \\*[an*topic-string]
-. ie (\\n[an*topic-new-length] >= \\n[an*topic-length]) \
+. length an*ident-new-length \\*[an*ident-string]
+. ie (\\n[an*ident-new-length] >= \\n[an*ident-length]) \
. break
-. ds an-pageref \\*[an*topic-abbv](\\*[an*section])\"
+. ds an-pageref \\*[an*ident-abbv](\\*[an*section])\"
. nr an-header-width \
\\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]'
. \}
-. ds an-pageref \\*[an-lic]\f[\\*[MF]]\\*[an*topic-abbv]\\*[an-ic]\
+. ds an-pageref \\*[an-lic]\f[\\*[MF]]\\*[an*ident-abbv]\\*[an-ic]\
\f[R](\\*[an*section])\"
-. rr an*topic-length-prev
+. rr an*ident-length-prev
. rr an-mark1
. rr an-mark2
. rm an-prefix
. rm an-suffix
-. rm an*topic-string
-. rr an*topic-length
+. rm an*ident-string
+. rr an*ident-length
. rr an-header-width
. rm an-ellipsis
..
@@ -1714,13 +1714,13 @@ contains unsupported escape sequence
.\" is an oblique style, append the corrections.
.ds an-lic \" left italic correction
.ds an-ic \" italic correction
-.ds an*topic-style \*[MF]\"
-.substring an*topic-style -1 -1
-.if '\*[an*topic-style]'I' \{\
+.ds an*ident-style \*[MF]\"
+.substring an*ident-style -1 -1
+.if '\*[an*ident-style]'I' \{\
. as an-lic \,\"
. as an-ic \/\"
.\}
-.rm an*topic-style
+.rm an*ident-style
.
.if \n[cR] \
. an-set-up-continuous-rendering
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 15/30: [man]: Rename internal strings and registers.,
G. Branden Robinson <=