groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 23/49: [mdoc]: Trivially refactor.


From: G. Branden Robinson
Subject: [groff] 23/49: [mdoc]: Trivially refactor.
Date: Sun, 6 Nov 2022 00:37:20 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit a11a0772e6395e6aa5886c79e3c53de728d6264a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Nov 3 07:56:11 2022 -0500

    [mdoc]: Trivially refactor.
    
    * tmac/doc.tmac:
    * tmac/mdoc/doc-common: Rename strings for clarity.
      - doc-document-title -> doc-page-topic
      - doc-document-title-saved -> doc-page-topic-saved
    * tmac/mdoc/doc-common: Use new name `doc-page-topic`.
    
    Also clarify a comment; "section" vs. "volume" gets confusing,
    especially because this use of "volume" is historically inaccurate.  The
    Unix manuals came in two volumes only in 7th Edition and 10th Research
    Editions.  Volume I contained man pages and Volume II contained
    technical papers.
---
 ChangeLog            |  8 ++++++++
 tmac/doc.tmac        |  4 ++--
 tmac/mdoc/doc-common | 20 ++++++++++----------
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e945798a..2e09437b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-11-03  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/doc.tmac:
+       * tmac/mdoc/doc-common: Rename strings for clarity.
+       - doc-document-title -> doc-page-topic
+       - doc-document-title-saved -> doc-page-topic-saved
+       * tmac/mdoc/doc-common: Use new name.
+
 2022-11-03  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/mdoc/doc-ditroff (doc-page-topic-font):
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index ef83e160d..705e41486 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -3644,7 +3644,7 @@
 .  ds doc-volume-name-saved "\*[doc-volume-name]
 .  nr doc-have-author-saved \n[doc-have-author]
 .
-.  ds doc-document-title-saved "\*[doc-document-title]
+.  ds doc-page-topic-saved "\*[doc-page-topic]
 .  ds doc-volume-saved "\*[doc-volume]
 .  ds doc-section-saved "\*[doc-section]
 .  ds doc-operating-system-saved "\*[doc-operating-system]
@@ -3785,7 +3785,7 @@
 .  ds doc-volume-name "\*[doc-volume-name-saved]
 .  nr doc-have-author \n[doc-have-author-saved]
 .
-.  ds doc-document-title "\*[doc-document-title-saved]
+.  ds doc-page-topic "\*[doc-page-topic-saved]
 .  ds doc-volume "\*[doc-volume-saved]
 .  ds doc-section "\*[doc-section-saved]
 .  ds doc-operating-system "\*[doc-operating-system-saved]
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 19cf0c022..9462c1e37 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -233,10 +233,10 @@
 .
 .\" header assembly macros
 .
-.\" NS doc-document-title global string
+.\" NS doc-page-topic global string
 .\" NS   the title of the manual page
 .
-.ds doc-document-title UNTITLED\"
+.ds doc-page-topic UNTITLED\"
 .
 .
 .\" NS doc-volume global string
@@ -246,7 +246,7 @@
 .
 .
 .\" NS doc-section global string
-.\" NS   the manual section
+.\" NS   the manual section (1, 2, 3, ..., 3perl, 9)
 .
 .ds doc-section \" empty
 .
@@ -271,7 +271,7 @@
 .
 .eo
 .de doc-set-up-titles
-.  ds doc-pageref "\*[doc-document-title]
+.  ds doc-pageref "\*[doc-page-topic]
 .  if !"\*[doc-section]"" \
 .    as doc-pageref \|(\*[doc-section])
 .
@@ -336,7 +336,7 @@
 .\" NS   document title
 .\" NS
 .\" NS modifies:
-.\" NS   doc-document-title
+.\" NS   doc-page-topic
 .\" NS   doc-section
 .\" NS   doc-volume
 .\" NS
@@ -462,10 +462,10 @@
 .    tm mdoc warning: .Dt directive expects one or more arguments \
 (#\n[.c])
 .  if !"\$1"" \
-.    ds doc-document-title "\$1
+.    ds doc-page-topic "\$1
 .
 .  if \n[CT] \
-.    stringup doc-document-title
+.    stringup doc-page-topic
 .
 .  if !"\$2"" \{\
 .    ds doc-section \$2
@@ -990,7 +990,7 @@
 .  doc-set-up-titles
 .
 .  if '\*[.T]'pdf' \
-.    pdfbookmark 1 "\*[doc-document-title](\*[doc-section])"
+.    pdfbookmark 1 "\*[doc-page-topic](\*[doc-section])"
 .
 .  doc-header
 .  nr doc-is-first-page-of-document 0
@@ -1144,7 +1144,7 @@
 .
 .  \" Reset strings to reduce info leaks from one man page to the next.
 .  ds doc-date-string UNDATED\"
-.  ds doc-document-title UNTITLED\"
+.  ds doc-page-topic UNTITLED\"
 .  ds doc-volume LOCAL\"
 .  ds doc-section \" empty
 .  ds doc-operating-system \" empty
@@ -1652,7 +1652,7 @@
 .  tm doc-volume-name == '\*[doc-volume-name]'
 .  tm doc-have-author == \n[doc-have-author]
 .
-.  tm doc-document-title == '\*[doc-document-title]'
+.  tm doc-page-topic == '\*[doc-page-topic]'
 .  tm doc-volume == '\*[doc-volume]'
 .  tm doc-section == '\*[doc-section]'
 .  tm doc-operating-system == '\*[doc-operating-system]'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]