[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 14/15: Fix Savannah bug #44708 (1/2).
From: |
Werner LEMBERG |
Subject: |
[groff] 14/15: Fix Savannah bug #44708 (1/2). |
Date: |
Fri, 03 Apr 2015 15:28:51 +0000 |
wl pushed a commit to branch master
in repository groff.
commit 42c866a3fc0552f7f91a4af1ba93a942130e1bd7
Author: Werner Lemberg <address@hidden>
Date: Fri Apr 3 16:54:12 2015 +0200
Fix Savannah bug #44708 (1/2).
* tmac/andoc.tmac (reload_doc, reload_man): Don't use `de1',
otherwise we can't manipulate the compatibility flag within the
macro.
* tmac/doc-common-u (Dt): Remove invalid leading whitespace.
---
ChangeLog | 10 +++++++++
tmac/andoc.tmac | 57 +++++++++++++++++++++++++++++++++-------------------
tmac/doc-common-u | 2 +-
3 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a12dbcf..598a79c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-04-03 Werner LEMBERG <address@hidden>
+
+ Fix Savannah bug #44708 (1/2).
+
+ * tmac/andoc.tmac (reload_doc, reload_man): Don't use `de1',
+ otherwise we can't manipulate the compatibility flag within the
+ macro.
+
+ * tmac/doc-common-u (Dt): Remove invalid leading whitespace.
+
2015-03-11 Deri James <address@hidden>
* src/devices/gropdf/gropdf.pl: Was not handling the final glyph
diff --git a/tmac/andoc.tmac b/tmac/andoc.tmac
index 38a59a9..386a272 100644
--- a/tmac/andoc.tmac
+++ b/tmac/andoc.tmac
@@ -34,35 +34,50 @@
.als andoc-em em
.als andoc-bp bp
.
-.de1 reload-doc
-. ch an-header \" remove trap set by an-old.tmac
-. ch an-footer \" remove trap set by an-old.tmac
-. ch an-p-footer \" remove trap set by an-old.tmac
.
-. als em andoc-em
-. als bp andoc-bp
-. rm Dd \" disable load-only-once, see doc.tmac
+.\" We must not use `.de1' for `reload-doc' or `reload-man'! `doc.tmac'
+.\" unconditionally switches compatibility mode off, but `.de1' would ignore
+.\" this, restoring the mode that was active before. Similarly, we have to
+.\" switch back to the original compatibility mode for man documents in case
+.\" there is a mix of mdoc and man input files.
+.\"
+.\" Due to a bug in GNU troff it necessary to have a no-op line between
+.\" `.do' and `\*'.
+.
+.
+.de reload-doc
+. do ch an-header \" remove trap set by an-old.tmac
+. do ch an-footer \" remove trap set by an-old.tmac
+. do ch an-p-footer \" remove trap set by an-old.tmac
+.
+. do als em andoc-em
+. do als bp andoc-bp
+. do rm Dd \" disable load-only-once, see doc.tmac
.
-. mso doc.tmac
+. do mso doc.tmac
.
-. als TH reload-man
-\\*[Dd]\\
+. do als TH reload-man
+.
+\\*(Dd\\
..
.
-.de1 reload-man
-. ch header \" remove trap set by doc.tmac
-. ch footer \" remove trap set by doc.tmac
+.de reload-man
+. do cp \n(.C \" restore original compatibility mode
+.
+. do ch header \" remove trap set by doc.tmac
+. do ch footer \" remove trap set by doc.tmac
+.
+. do als em andoc-em
+. do als bp andoc-bp
+. do rm RI \" disable load-only-once, see an-old.tmac
+. do blm \" no blank line macro
+. do rm TH
.
-. als em andoc-em
-. als bp andoc-bp
-. rm RI \" disable load-only-once, see an-old.tmac
-. blm \" no blank line macro
-. rm TH
+. do mso an-old.tmac
.
-. mso an-old.tmac
+. do als Dd reload-doc
.
-. als Dd reload-doc
-\\*[TH]\\
+\\*(TH\\
..
.
.als TH reload-man
diff --git a/tmac/doc-common-u b/tmac/doc-common-u
index 2bc54ee..24d86d8 100644
--- a/tmac/doc-common-u
+++ b/tmac/doc-common-u
@@ -391,7 +391,7 @@
.
. if !\n[cR] \
. if \n[nl] \{\
- . doc-setup-header
+. doc-setup-header
. bp
. \}
..
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 14/15: Fix Savannah bug #44708 (1/2).,
Werner LEMBERG <=