[Top][All Lists]

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

[Groff] Minor improvement to MM .EOP processing

From: Larry Jones
Subject: [Groff] Minor improvement to MM .EOP processing
Date: Wed, 2 Jun 2010 11:36:32 -0400

The user-defined .EOP macro in mgm overrides the normal end of page
processing, but there's no convenient way to invoke said normal
processing if one merely wants to augment it rather than completely
replacing it.  It seems to me that it would be better to pre-define .EOP
to do the normal end of page processing so that the user can rename it
in order to augment it or just redefine it to override it.  Here's the

Index: contrib/mm/
RCS file: /sources/groff/groff/contrib/mm/,v
retrieving revision 2.26
diff -u -r2.26
--- contrib/mm/     27 Apr 2010 08:03:47 -0000      2.26
+++ contrib/mm/     2 Jun 2010 14:56:44 -0000
@@ -765,8 +765,8 @@
-End-of-page user-defined macro.
-This macro is called instead of the normal printing of the footer.
+End-of-page macro.
+This macro prints the normal footer but can be overridden.
 The macro is executed in a separate environment,
 without any trap active.
Index: contrib/mm/m.tmac
RCS file: /sources/groff/groff/contrib/mm/m.tmac,v
retrieving revision 2.40
diff -u -r2.40 m.tmac
--- contrib/mm/m.tmac   2 Jun 2010 14:13:41 -0000       2.40
+++ contrib/mm/m.tmac   2 Jun 2010 14:56:44 -0000
@@ -1295,6 +1295,18 @@
 .if address@hidden .eo         \" to help VERBON/VERBOFF
+.\" user overrideable end-of-page macro EOP o .tl \\*[pg*odd-footer]
+.el .tl \\*[pg*even-footer]
+.ds hd*format \\g[P] P 0 (\\n[P]=1)&(\\n[N]=1) .tl \\*[pg*header]
+.el .tl \\*[pg*footer] P \\*[hd*format] ''address@hidden'
 .de address@hidden
 .\" jump to the position just below the foot-notes.
 'sp |\\n[pg*last-pos]u+1v
@@ -1306,18 +1318,7 @@
 .ev pg*tl-ev
 .vpt 0
-.\" user defined end-of-page macro d EOP .EOP
-.el \{\
-.      ie o .tl \\*[pg*odd-footer]
-.      el .tl \\*[pg*even-footer]
-.      ds hd*format \\g[P]
-.      af P 0
-.      ie (\\n[P]=1)&(\\n[N]=1) .tl \\*[pg*header]
-.      el .tl \\*[pg*footer]
-.      af P \\*[hd*format]
-.      tl ''address@hidden''
 .vpt 1
 .\" be sure that floating displays and footnotes will be
Larry Jones

I've got more brains than I know what to do with. -- Calvin

reply via email to

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