[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.57,1.58

Nicolas FRAN??OIS po4a-devel@lists.alioth.debian.org
Fri, 12 Nov 2004 00:28:44 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv11507/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
The .HP macro set up a paragraph with hanging left indentation for the
first line, but the line following a .HP is not different from the next
line of the paragraph (the mentionned "first line" is the first line
displayed, not the first one following the macro). Thus .HP lines are
untranslated.
This permits to remove some special handling of .HP in other places.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- Man.pm	11 Nov 2004 22:34:20 -0000	1.57
+++ Man.pm	12 Nov 2004 00:28:41 -0000	1.58
@@ -384,7 +384,7 @@
         set_regular("B");
     }
     $str = do_fonts($str);
-    if (defined $self->{type} && $self->{type} =~ m/^(SH|HP|SS)$/) {
+    if (defined $self->{type} && $self->{type} =~ m/^(SH|SS)$/) {
         set_regular("R");
     }
 
@@ -424,8 +424,8 @@
     # No . or ' on first char, or nroff will think it's a macro
     # * at the beginning of a paragraph, add \& (zero width space) at
     #   the beginning of the line
-    unless (defined $self->{type} && $self->{type} =~ m/^(TS|TP|HP)$/) {
-        # This doesn't work after a TP, HP or TS (all those macros shift
+    unless (defined $self->{type} && $self->{type} =~ m/^(TS|TP)$/) {
+        # This doesn't work after a TP or TS (all those macros shift
         # lines, which may contain macros)
         $str =~ s/^((?:
                        (?:CW|[RBI])<
@@ -1088,14 +1088,11 @@
 #                graph's lines are indented).
 #
 $macro{'HP'}=sub {
-    my $self=shift;
-    my ($line,$l2,$ref2);
-    $line .= $_[0] if defined($_[0]);
-    $line .= ' '.$_[1] if defined($_[1]);
-    $line .= "\n";
-    ($l2,$ref2) = $self->shiftline();
-    chomp($l2);
-    $self->pushline($line.$self->t($l2)."\n");
+    untranslated(@_);
+
+    # From info groff:
+    # Font size and face are reset to their default values.
+    set_font("R");
 };
 
 # Indented Paragraph Macros