aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-22 19:45:25 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-22 19:46:48 +0200
commit3c38c0873e6b5f5814695e18b956a7378627aa45 (patch)
tree35f931e5443e472dcc75356a2d7b856e45ff61e2
parentc2967cf7bb2dbbec96005b49b6a8982a0a13e003 (diff)
downloadmk-3c38c0873e6b5f5814695e18b956a7378627aa45.tar.gz
Remove @ds, @nr
There are no longer any registers or strings to set default values for.
-rw-r--r--g.tmac31
1 files changed, 8 insertions, 23 deletions
diff --git a/g.tmac b/g.tmac
index da9b6f9..9ed304f 100644
--- a/g.tmac
+++ b/g.tmac
@@ -30,11 +30,14 @@
.
.\" @a -- setup document
.de @a
+. nr @a 1
.
-. \" initialize document
+. \" set header/footer traps
. wh 0 @th
. if \n(.t=\n(.p .wh -1i @tf
-. sp 1u \" trigger header
+.
+. \" trigger header
+. if \n(nl=0 .@th
.
. \" configure environments
. @e d \" date
@@ -113,10 +116,7 @@
. ds #e \*(#e \n[year]
..
.
-.
-..
-.
-. \" @c -- copy environment
+.\" @c -- copy environment
.de @c
. evc \$1
. nr sp \n[@\$1_sp]
@@ -124,11 +124,6 @@
. nr ti \n[@\$1_ti]
..
.
-.\" @ds -- set default string value
-.de @ds
-. if '\*[\$1]'' .ds \$1 \$2
-..
-.
.\" (e -- set environment
.de (e
. ev \$1
@@ -138,10 +133,7 @@
.de @e
.
. \" initialize document if not initialized
-. if '\n(@a'0' \{\
-. nr @a 1
-. @a
-. \}
+. if '\n(@a'0' .@a
.
. \" save special environment variables
. if !'\n[.ev]'0' \{\
@@ -192,13 +184,6 @@
. sp |1i
..
.
-..
-.
-.\" @nr -- set default numeric value
-.de @nr
-. if \n[\$1]=0 .nr \$1 \$2
-..
-.
.\" @tf -- footer trap
.de @tf
.
@@ -313,7 +298,7 @@ ___________________
.de d
. br
. @e d
-. if !'\$1'' \*(#\$1
+. if !'\$1'' \*[#\$1]
..
.
.\" h -- heading