gbranden pushed a commit to branch master
in repository groff.

commit 8ab11a22550b3a19a7a3f50d29705d8110d01c56
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jun 22 19:53:40 2024 -0500

    [mm]: Reset hyphenation consistently.
    
    * contrib/mm/m.tmac: Manipulate automatic hyphenation using
      locale-appropriate modes, not those particular to English.
    
      (@enable-hyphenation): New macro restores hyphenation using groff 1.24
      `hy` behavior if available, and registers defined by locale tmac files
      otherwise (see groff_tmac(5)).
    
      (@reset, pg@header): Replace explicit setting of hyphenation mode 14
      with call of `@enable-hyphenation`.
    
      (MULB, ft@init): Replace explicit setting of hyphenation mode 6 with
      call of `@enable-hyphenation`.
    
      (B1): Replace no-op request with call of `@enable-hyphenation`.
---
 contrib/mm/ChangeLog | 13 +++++++++++++
 contrib/mm/m.tmac    | 15 +++++++++------
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 06102d89a..a0b47009b 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,16 @@
+2024-06-22  G. Branden Robinson <[email protected]>
+
+       * m.tmac: Manipulate automatic hyphenation using
+       locale-appropriate modes, not those particular to English.
+       (@enable-hyphenation): New macro restores hyphenation using
+       groff 1.24 `hy` behavior if available, and registers defined by
+       locale tmac files otherwise (see groff_tmac(5)).
+       (@reset, pg@header): Replace explicit setting of hyphenation
+       mode 14 with call of `@enable-hyphenation`.
+       (MULB, ft@init): Replace explicit setting of hyphenation mode 6
+       with call of `@enable-hyphenation`.
+       (B1): Replace no-op request with call of `@enable-hyphenation`.
+
 2024-06-22  G. Branden Robinson <[email protected]>
 
        * m.tmac (PIC): Reckon optional indentation argument in ens by
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 5755c475a..ba3189535 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -355,12 +355,16 @@ http://savannah.gnu.org/bugs/?group=groff.
 .ie d @country .msoquiet mm/\*[@country]_locale
 .el            .msoquiet mm/locale
 .\"---------------------------------------------
+.de @enable-hyphenation
+.ie r .hydefault .hy \" Use groff 1.24 feature.
+.el              .hy \\n[\\*[locale]*hyphenation-mode-trap]
+..
 .\"    reset all the things
 .\" XXX: Resets .cu and .ul but _not_ .ce or .rj.
 .de @reset
 .ie \\n[misc@adjust] .ad
 .el                  .na
-.ie \\n[Hy] .hy 14
+.ie \\n[Hy] .@enable-hyphenation
 .el         .nh
 'in 0
 'ti 0
@@ -1309,8 +1313,7 @@ numeric; got '\\$1'
 .              @error insufficient page length; aborting
 .      \}
 .\}
-.\" check if Hy has been changed
-.ie \\n[Hy] .hy 14
+.ie \\n[Hy] .@enable-hyphenation
 .el         .nh
 .if \\n[Idxf] \{\
 .tl '<pagenr\ \\n[%]>'''
@@ -1689,7 +1692,7 @@ breaking page
 .fam \\*[pg*mul-fam]
 .ft \\n[pg*mul-font]
 .fi
-.hy 6
+.@enable-hyphenation
 .di pg*mul-div
 .MULN
 ..
@@ -1757,7 +1760,7 @@ breaking page
 'fi
 .ie \\n[ft*adjust] .ad
 .el                .na
-.ie \\n[ft*hyphen] .hy 6
+.ie \\n[ft*hyphen] .@enable-hyphenation
 .el                .hy 0
 .ll \\n[@cur-ll]u
 .lt \\n[@cur-ll]u
@@ -2905,7 +2908,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .vs \\n[@vs]u
 .in 1n
 .ll (u;\\n[box*wid]-1n)
-.hy \\n[.hy]
+.@enable-hyphenation
 ..
 .de B2
 .if !\\n[box*ll] .@error \\$0: no corresponding B1

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

Reply via email to