groff-commit
[Top][All Lists]
Advanced

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

[groff] 04/06: [tmac]: Simplify `mso` requests.


From: G. Branden Robinson
Subject: [groff] 04/06: [tmac]: Simplify `mso` requests.
Date: Sat, 3 Jul 2021 10:51:17 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 8c908c28e9868a901f6274082bbb7aee09af3898
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jul 3 21:06:55 2021 +1000

    [tmac]: Simplify `mso` requests.
    
    * tmac/X.tmac:
    * tmac/Xps.tmac:
    * tmac/dvi.tmac:
    * tmac/html.tmac:
    * tmac/lbp.tmac:
    * tmac/lj4.tmac:
    * tmac/ps.tmac:
    * tmac/tty-char.tmac:
    * tmac/tty.tmac:
    * tmac/www.tmac.in: Move `mso` requests to be inside regions where
      compatibility mode is turned off.  I believe they were placed where
      they were because things didn't work when the compatibility mode
      register being saved was .C, rather than the .cp register introduced
      in commit 6a37bb5f, 17 April 2020.  Now the logic is less mysterious.
      Also, remove the register used to save compatibility mode after we're
      done with it, to reduce name space clutter.
---
 ChangeLog          | 22 ++++++++++++++++++++++
 tmac/X.tmac        | 11 ++++++-----
 tmac/Xps.tmac      | 14 ++++++++------
 tmac/dvi.tmac      | 11 ++++++-----
 tmac/html.tmac     | 13 +++++++------
 tmac/lbp.tmac      |  5 +++--
 tmac/lj4.tmac      |  5 +++--
 tmac/ps.tmac       | 13 +++++++------
 tmac/tty-char.tmac |  8 +++++---
 tmac/tty.tmac      | 11 ++++++-----
 tmac/www.tmac.in   |  5 +++--
 11 files changed, 76 insertions(+), 42 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1cb35dd..c2821e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2021-07-03  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       [tmac]: Simplify `mso` requests.
+
+       * tmac/X.tmac:
+       * tmac/Xps.tmac:
+       * tmac/dvi.tmac:
+       * tmac/html.tmac:
+       * tmac/lbp.tmac:
+       * tmac/lj4.tmac:
+       * tmac/ps.tmac:
+       * tmac/tty-char.tmac:
+       * tmac/tty.tmac:
+       * tmac/www.tmac.in: Move `mso` requests to be inside regions
+       where compatibility mode is turned off.  I believe they were
+       placed where they were because things didn't work when the
+       compatibility mode register being saved was .C, rather than the
+       .cp register introduced in commit 6a37bb5f, 17 April 2020.  Now
+       the logic is less mysterious.  Also, remove the register used to
+       save compatibility mode after we're done with it, to reduce name
+       space clutter.
+
+2021-07-03  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * tmac/it.tmac: Drop sourcing of `latin1.tmac` and set up of
        hyphenation codes; since the `hyphen.it` file is pure ASCII, we
        don't need to expect Latin-1-encoded code points in it.
diff --git a/tmac/X.tmac b/tmac/X.tmac
index f8e737a..c6f7ec0 100644
--- a/tmac/X.tmac
+++ b/tmac/X.tmac
@@ -122,12 +122,13 @@
 .  char \[radicalex] \h'-\w'\[sr]'u'\[radicalex]\h'\w'\[sr]'u'
 .fchar \[sqrtex] \[radicalex]
 .
-.cp \n[*groff_X_tmac_C]
-.
-.do ie '\[char97]'a' \
-.  do mso latin1.tmac
+.ie '\[char97]'a' \
+.  mso latin1.tmac
 .el \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
+.
+.cp \n[*groff_X_tmac_C]
+.do rr *groff_X_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/Xps.tmac b/tmac/Xps.tmac
index 38ad76a..aaef0ce 100644
--- a/tmac/Xps.tmac
+++ b/tmac/Xps.tmac
@@ -1,9 +1,10 @@
 .\" Xps.tmac
 .\"
-.do mso ps.tmac
 .do nr *groff_Xps_tmac_C \n[.cp]
 .cp 0
 .
+.mso ps.tmac
+.
 .\" Use this macro only to replace characters which do really exist in
 .\" the devps font definition files.
 .de Xps-char
@@ -49,12 +50,13 @@
 .Xps-char \[lh] \[lA]
 .Xps-char \[rh] \[rA]
 .
-.cp \n[*groff_Xps_tmac_C]
-.
-.do ie '\[char97]'a' \
-.  do mso latin1.tmac
+.ie '\[char97]'a' \
+.  mso latin1.tmac
 .el \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
+.
+.cp \n[*groff_Xps_tmac_C]
+.do rr *groff_Xps_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/dvi.tmac b/tmac/dvi.tmac
index 3bf52de..2ff8319 100644
--- a/tmac/dvi.tmac
+++ b/tmac/dvi.tmac
@@ -778,12 +778,13 @@ D\v'-.33m'\s0\v'.33m'
 .defcolor yellow3 rgb #cdcd00
 .defcolor yellow4 rgb #8b8b00
 .
-.cp \n[*groff_dvi_tmac_C]
-.
-.do ie '\[char97]'a' \
-.  do mso latin1.tmac
+.ie '\[char97]'a' \
+.  mso latin1.tmac
 .el \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
+.
+.cp \n[*groff_dvi_tmac_C]
+.do rr *groff_dvi_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/html.tmac b/tmac/html.tmac
index 52154e5..8ed03b4 100644
--- a/tmac/html.tmac
+++ b/tmac/html.tmac
@@ -535,14 +535,15 @@
 .
 .mso www.tmac
 .
-.cp \n[*groff_html_tmac_C]
-.
-.do ie '\[char97]'a' \
-.  do mso latin1.tmac
+.ie '\[char97]'a' \
+.  mso latin1.tmac
 .el \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
 .
-.do mso unicode.tmac
+.mso unicode.tmac
+.
+.cp \n[*groff_html_tmac_C]
+.do rr *groff_html_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/lbp.tmac b/tmac/lbp.tmac
index 87138f0..ad913a7 100644
--- a/tmac/lbp.tmac
+++ b/tmac/lbp.tmac
@@ -91,9 +91,10 @@
 .fchar \[s ,] \o's\[ac]'
 .hcode \[s ,]s
 .
-.cp \n[*groff_lbp_tmac_C]
+.mso latin1.tmac
 .
-.do mso latin1.tmac
+.cp \n[*groff_lbp_tmac_C]
+.do rr *groff_lbp_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/lj4.tmac b/tmac/lj4.tmac
index af968ec..60c8c1a 100644
--- a/tmac/lj4.tmac
+++ b/tmac/lj4.tmac
@@ -29,9 +29,10 @@
 .
 .fchar \[sqrtex] \[radicalex]
 .
-.cp \n[*groff_lj4_tmac_C]
+.mso latin1.tmac
 .
-.do mso latin1.tmac
+.cp \n[*groff_lj4_tmac_C]
+.do rr *groff_lj4_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/ps.tmac b/tmac/ps.tmac
index 860919e..8b796e3 100644
--- a/tmac/ps.tmac
+++ b/tmac/ps.tmac
@@ -684,14 +684,15 @@
 .defcolor yellow3 rgb #cdcd00
 .defcolor yellow4 rgb #8b8b00
 .
-.cp \n[*groff_ps_tmac_C]
-.
-.do ie '\[char97]'a' \
-.  do mso latin1.tmac
+.ie '\[char97]'a' \
+.  mso latin1.tmac
 .el \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
 .
-.do mso europs.tmac
+.mso europs.tmac
+.
+.cp \n[*groff_ps_tmac_C]
+.do rr *groff_ps_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/tty-char.tmac b/tmac/tty-char.tmac
index a632347..0f1466c 100644
--- a/tmac/tty-char.tmac
+++ b/tmac/tty-char.tmac
@@ -243,12 +243,14 @@
 .\"tty-char \[:y] \ij
 .tty-char \[arrowvertex] |
 .tty-char \[mc] <micro>
-.cp \n[*groff_tty-char_tmac_C]
 .
 .ie '\*(.T'cp1047' \
-.      do mso cp1047.tmac
+.      mso cp1047.tmac
 .el \
-.      do mso latin1.tmac
+.      mso latin1.tmac
+.
+.cp \n[*groff_tty-char_tmac_C]
+.do rr *groff_tty-char_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/tty.tmac b/tmac/tty.tmac
index 0b7e92b..2e9abde 100644
--- a/tmac/tty.tmac
+++ b/tmac/tty.tmac
@@ -83,17 +83,18 @@
 .defcolor cyan rgb #00ffff
 .defcolor white rgb #ffffff
 .
-.cp \n[*groff_tty_tmac_C]
-.
 .ie '\*(.T'cp1047' \
-.  do mso cp1047.tmac
+.  mso cp1047.tmac
 .el \
 .  if !'\*(.T'ascii' \
-.    do mso latin1.tmac
+.    mso latin1.tmac
 .
 .\" If you want the character definitions in tty-char.tmac to be loaded
 .\" automatically, remove the '\"' from the next line.
-.\"do mso tty-char.tmac
+.\"mso tty-char.tmac
+.
+.cp \n[*groff_tty_tmac_C]
+.do rr *groff_tty_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/www.tmac.in b/tmac/www.tmac.in
index d5e31e5..658d231 100644
--- a/tmac/www.tmac.in
+++ b/tmac/www.tmac.in
@@ -42,11 +42,11 @@ following, HTML always denotes XHTML also.
 .
 .do if d www:lenstr .nx
 .
-.do mso devtag.tmac
-.
 .do nr *groff_www_tmac_in_C \n[.cp]
 .cp 0
 .
+.mso devtag.tmac
+.
 .
 .\" Taken from tmac/an-ext.tmac
 .\" Map mono-width fonts to standard fonts for groff's TTY device.
@@ -1627,6 +1627,7 @@ following, HTML always denotes XHTML also.
 .
 .if r ps4html .nop \O[0]
 .cp \n[*groff_www_tmac_in_C]
+.do rr *groff_www_tmac_in_C
 .
 .\" now set
 .



reply via email to

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