groff-commit
[Top][All Lists]
Advanced

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

[groff] 17/33: [mm]: Trivially refactor (`@in-verbatim-region`).


From: G. Branden Robinson
Subject: [groff] 17/33: [mm]: Trivially refactor (`@in-verbatim-region`).
Date: Sat, 29 Jun 2024 01:14:14 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 84e21a1a1f78611bfa82e914bcf83e85cb6febad
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jun 23 12:59:30 2024 -0500

    [mm]: Trivially refactor (`@in-verbatim-region`).
    
    * contrib/mm/m.tmac ([initialization], VERBON, VERBOFF, pg@footer):
      Trivially refactor.  Rename internal register `@verbose-flag` to
      `@in-verbatim-region`, fixing linguistic solecism and clarifying the
      register's purpose.  Update comments accordingly.
    
    When your variable name communicates its meaning, rather than simply
    identifying it as a "flag", you less often requre comments to explain
    it.  Kernighan, Plauger, and Pike were trying to get this message
    to people decades ago.
---
 contrib/mm/ChangeLog |  7 +++++++
 contrib/mm/m.tmac    | 13 ++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a0b47009b..b5965d9f5 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m.tmac ([initialization], VERBON, VERBOFF, pg@footer):
+       Trivially refactor.  Rename internal register `@verbose-flag` to
+       `@in-verbatim-region`, fixing linguistic solecism and clarifying
+       the register's purpose.  Update comments accordingly.
+
 2024-06-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * m.tmac: Manipulate automatic hyphenation using
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index ba3189535..93a2e56ee 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -197,8 +197,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .lt \n[@ll]u
 .nr @po \n[.o]
 .
-.\" non-zero if escape mechanism is turned off. Used by VERBON/OFF
-.nr @verbose-flag 0
+.nr @in-verbatim-region 0
 .\"---------------------------------------------
 .\"    public groff mm extension registers and strings
 .
@@ -729,8 +728,8 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\"    flag
 .\"    bit     function
 .\"    0       escape character disablement
-.\"    1       add an empty line before verbose text
-.\"    2       add an empty line after verbose text
+.\"    1       add an empty line before verbatim text
+.\"    2       add an empty line after verbatim text
 .\"    3       number output lines using Verbnm string for .nm args
 .\"    4       indent text by amount in register Verbin
 .de VERBON
@@ -752,7 +751,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .if (0\\n[misc*verb]%32)/16 .in +\\n[Verbin]u
 .if 0\\n[misc*verb]%2 \{\
 .      eo
-.      nr @verbose-flag 1              \" tell pageheader to set ec/eo
+.      nr @in-verbatim-region 1
 .\}
 ..
 .de VERBOFF
@@ -762,7 +761,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .if (0\\n[misc*verb]%16)/8 .nm
 .if (0\\n[misc*verb]%32)/16 .in
 .ev
-.nr @verbose-flag 0
+.nr @in-verbatim-region 0
 ..
 .\" Wrapper to cancel the side effect of .tag + .br generating
 .\" unwanted vertical space.
@@ -1396,7 +1395,7 @@ numeric; got '\\$1'
 .\" next column
 .pg@set-po
 .pg@enable-trap
-.if \\n[@verbose-flag] .eo             \" to help VERBON/VERBOFF
+.if \\n[@in-verbatim-region] .eo
 ..
 .\"-------------------------
 .de pg@print-footer



reply via email to

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