texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ...
Date: Thu, 30 Dec 2010 17:36:51 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        10/12/30 17:36:51

Modified files:
        tp/Texinfo     : Common.pm Parser.pm Report.pm 
        tp/Texinfo/Convert: Info.pm Plaintext.pm 
        tp/t/results/macro: macro_in_misc_commands.pl 
        tp/t/results/misc_commands: many_lines.pl 
        tp/t/results/value: value_in_misc_commands.pl 

Log message:
        Determine output file for Info.
        Use global information for formatting out of tree (for @copying).
        More global informations used.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.170&r2=1.171
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Report.pm?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/macro/macro_in_misc_commands.pl?cvsroot=texinfo&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/misc_commands/many_lines.pl?cvsroot=texinfo&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/value/value_in_misc_commands.pl?cvsroot=texinfo&r1=1.34&r2=1.35

Patches:
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Texinfo/Common.pm   6 Dec 2010 21:46:28 -0000       1.7
+++ Texinfo/Common.pm   30 Dec 2010 17:36:51 -0000      1.8
@@ -476,6 +476,29 @@
   $encoding_aliases{$eight_bit_encoding_aliases{$encoding}} = $encoding;
 }
 
-1;
-
+sub open_out ($$;$)
+{
+  my $self = shift;
+  my $file = shift;
+  my $encoding = shift;
+  if ($file eq '-') {
+    binmode(STDOUT, ":encoding($encoding)") if (defined($encoding));
+    return \*STDOUT;
+  }
+  my $filehandle = do { local *FH };
+  if (!open ($filehandle, ">$file")) {
+    return undef; 
+  }
+  if (defined($encoding)) {
+    if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
+      binmode($filehandle, ':utf8');
+    } else {
+      binmode($filehandle, ':bytes');
+    }
+    binmode($filehandle, ":encoding($encoding)");
+  }
+  push @{$self->{'opened_files'}}, $file;
+  return $filehandle;
+}
 
+1;

Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -b -r1.170 -r1.171
--- Texinfo/Parser.pm   28 Dec 2010 19:05:01 -0000      1.170
+++ Texinfo/Parser.pm   30 Dec 2010 17:36:51 -0000      1.171
@@ -376,7 +376,8 @@
 foreach my $global_unique_command ('documentencoding', 'title', 
   'shorttitlepage', 'settitle', 'copying', 'documentdescription', 'titlepage',
   'setfilename', 'setcontentsaftertitlepage', 
-  'setshortcontentsaftertitlepage') {
+  'setshortcontentsaftertitlepage', 'paragraphindent', 'firstparagraphindent',
+  'frenchspacing', 'documentencoding', 'footnotestyle') {
   $global_unique_commands{$global_unique_command} = 1;
 }
 

Index: Texinfo/Report.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Report.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- Texinfo/Report.pm   7 Dec 2010 20:34:26 -0000       1.2
+++ Texinfo/Report.pm   30 Dec 2010 17:36:51 -0000      1.3
@@ -118,5 +118,27 @@
   $self->{'error_nrs'}++ unless ($continuation);
 }
 
+sub document_warn ($$)
+{
+  my $self = shift;
+  my $text = shift;
+  chomp ($text);
+  my $warn_line = sprintf($self->__("warning: %s\n"), $text);
+  push @{$self->{'errors_warnings'}},
+    { 'type' => 'warning', 'text' => $text, 'error_line' => $warn_line};
+}
+
+sub document_error ($$)
+{
+  my $self = shift;
+  my $text = shift;
+  chomp ($text);
+  $text .= "\n";
+  push @{$self->{'errors_warnings'}},
+    { 'type' => 'error', 'text' => $text, 'error_line' => $text };
+  $self->{'error_nrs'}++;
+}
+  
+
 
 1;

Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Texinfo/Convert/Info.pm     28 Dec 2010 19:05:02 -0000      1.4
+++ Texinfo/Convert/Info.pm     30 Dec 2010 17:36:51 -0000      1.5
@@ -57,18 +57,104 @@
   my $result = '';
 
   my $header = $self->_info_header();
+  my $header_bytes = $self->count_bytes($header);
   my $elements = Texinfo::Structuring::split_by_node($root);
+
+  my $fh = $self->Texinfo::Common::open_out ($self->{'output_file'}, 
+                                             $self->{'encoding'});
+  if (!$fh) {
+    $self->document_error(sprintf($self->__("Could not open %s for writing: 
$!"),
+                                  $self->{'output_file'}));
+    return undef;
+  }
   if (!defined($elements)) {
+    $self->document_warn($self->__("Document without nodes."));
     ($result) = $self->_convert($root);
     my ($footnotes) = $self->_footnotes();
     $result .= $footnotes;
+    print $fh $result;
+    close ($fh);
   } else {
-    foreach my $node (@$elements) {
+    my $out_file_nr = 1;
+    my @indirect_files;
+    print $fh $header;
+    $self->{'file_bytes_count'} += $header_bytes;
+    my $first_node_bytes_count = $self->{'file_bytes_count'};
+    my @nodes = @$elements;
+    while (@nodes) {
+      my $node = shift @nodes;
       my ($node_text) = $self->_convert_node($node);
-      $result .= $node_text;
+      print $fh $node_text;
+      if (defined($self->{'split_size'}) 
+          and $self->{'file_bytes_count'} > 
+                  $out_file_nr * $self->{'split_size'} and @nodes) {
+        close ($fh);
+        if ($out_file_nr == 1) {
+          unless (rename ($self->{'output_file'}, 
+                          $self->{'output_file'}.'-'.$out_file_nr)) {
+            $self->document_error(sprintf($self->__("Rename %s failed: $!"), 
+                                         $self->{'output_file'}));
+          }
+          push @{$self->{'opened_files'}}, 
+                   $self->{'output_file'}.'-'.$out_file_nr;
+          push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
+                                 $first_node_bytes_count];
+          #print STDERR join(' --> ', @{$indirect_files[-1]}) ."\n";
+        }
+        $out_file_nr++;
+        $fh = $self->Texinfo::Common::open_out (
+                               $self->{'output_file'}.'-'.$out_file_nr, 
+                               $self->{'encoding'});
+        if (!$fh) {
+           $self->document_error(sprintf(
+                  $self->__("Could not open %s for writing: $!"),
+                  $self->{'output_file'}.'-'.$out_file_nr));
+           return undef;
+        }
+        print $fh $header;
+        $self->{'file_bytes_count'} += $header_bytes;
+        push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
+                               $self->{'file_bytes_count'}];
+        #print STDERR join(' --> ', @{$indirect_files[-1]}) ."\n";
+      }
+      #$result .= $node_text;
+    }
+    if ($out_file_nr > 1) {
+      close ($fh);
+      $fh = $self->Texinfo::Common::open_out($self->{'output_file'}, 
+                                             $self->{'encoding'});
+      if (!$fh) {
+        $self->document_error(sprintf(
+              $self->__("Could not open %s for writing: $!"),
+              $self->{'output_file'}.'-'.$out_file_nr));
+        return undef;
+      }
+      print $fh $header;
+      print $fh "\x{1F}\nIndirect:";
+      foreach my $indirect (@indirect_files) {
+        print $fh "\n$indirect->[0]: $indirect->[1]";
+      }
+    }
+    print $fh "\n\x{1F}\nTag Table:\n";
+    if ($out_file_nr > 1) {
+      print $fh "(Indirect)\n";
+    }
+    foreach my $label (@{$self->{'label_locations'}}) {
+      next unless ($label->{'root'});
+      my $prefix = 'Ref';
+      $prefix = 'Node' if ($label->{'root'}->{'cmdname'} eq 'node');
+      my ($label_text) = $self->convert_line({'type' => 'code',
+        'contents' => $label->{'root'}->{'extra'}->{'node_content'}});
+      print $fh "$prefix: $label_text\x{7F}$label->{'bytes'}\n";
+    }
+    print $fh "\x{1F}\nEnd Tag Table\n";
+    my $coding = $self->{'encoding'};
+    $coding = $self->{'documentencoding'} if (!defined($coding));
+    if ($coding and $coding ne 'us-ascii') {
+      print $fh "\n\x{1F}\nLocal Variables:\ncoding: $coding\nEnd:\n";
     }
   }
-  return $header.$result;
+  return $self;
 }
 
 sub _info_header($)
@@ -90,28 +176,33 @@
            and $self->{'extra'}->{'setfilename'}->{'extra'}
            and 
defined($self->{'extra'}->{'setfilename'}->{'extra'}->{'text_arg'})) {
     $output_file = $self->{'extra'}->{'setfilename'}->{'extra'}->{'text_arg'};
-    $output_file =~ s/^.*\///;
+    $self->{'output_file'} = $output_file;
   } elsif ($input_basename ne '') {
     $output_file = $input_basename;
     $output_file =~ s/\.te?x(i|info)?$//;
     $output_file .= '.'.$INFO_EXTENSION;
+    $self->{'output_file'} = $output_file;
   } else {
     $output_file = '';
   }
+  my $output_basename = $output_file;
+  $output_basename =~ s/^.*\///;
+  $self->{'output_filename'} = $output_basename;
   # FIXME version/program
-  my $text = "This is $output_file, produced by makeinfo version 4.13 from 
$input_basename.";
+  my $text = "This is $output_basename, produced by makeinfo version 4.13 from 
$input_basename.";
   my $paragraph = Texinfo::Convert::Paragraph->new();
   my $result = $paragraph->add_text($text);
   $result .= $paragraph->end();
-  $result .= "\n\n";
+  $result .= "\n";
+
   if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
     my $options = {};
     if ($self->{'enable_encoding'}) {
       $options->{'enabled_encoding'} = $self->{'encoding'};
     }
-    $result .= Texinfo::Convert::Text::convert({'contents' => 
-                             $self->{'extra'}->{'copying'}->{'contents'}},
-                                               $options);
+    my ($copying) = $self->_convert({'contents' => 
+          $self->{'extra'}->{'copying'}->{'contents'}}, $options);
+    $result .= $copying;
   }
   if ($self->{'info'}->{'dircategory_direntry'}) {
     $self->{'ignored_commands'}->{'direntry'} = 0;
@@ -358,8 +449,7 @@
 
   my $bytes_count = 0;
 
-  # FIXME $outfile
-  my $result = "\x{1F}\nFile: outfile,  Node:  ";
+  my $result = "\x{1F}\nFile: $self->{'output_filename'},  Node:  ";
   $bytes_count += $self->count_bytes($result);
   $self->advance_count_text(\$result, \$bytes_count, undef,
                undef, 0, $self->convert_line({'type' => 'code', 
@@ -387,7 +477,8 @@
   $result .="\n\n";
   $bytes_count += $self->count_bytes("\n\n");
 
-  return ($result, {'bytes' => $bytes_count, 'lines' => 3});
+  return ($result, {'bytes' => $bytes_count, 'lines' => 3}, 
+          [{'bytes' => 0, 'root' => $node}]);
 }
 
 sub _anchor($$)

Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- Texinfo/Convert/Plaintext.pm        28 Dec 2010 19:05:02 -0000      1.40
+++ Texinfo/Convert/Plaintext.pm        30 Dec 2010 17:36:51 -0000      1.41
@@ -62,9 +62,12 @@
 
 my $NO_NUMBER_FOOTNOTE_SYMBOL = '*';
 
+my @informative_global_commands = ('paragraphindent', 'firstparagraphindent',
+'frenchspacing', 'documentencoding', 'footnotestyle');
+
 my %informative_commands;
-foreach my $informative_command ('paragraphindent', 'firstparagraphindent',
-  'frenchspacing', 'documentencoding', 'footnotestyle', 'documentlanguage') {
+foreach my $informative_command (@informative_global_commands, 
+                                 'documentlanguage') {
   $informative_commands{$informative_command} = 1;
 }
 
@@ -224,7 +227,7 @@
 }
 
 my %defaults = (
-  'frenchspacing'        => 0,
+  'frenchspacing'        => 'off',
   'paragraphindent'      => 3,
   'firstparagraphindent' => 'none',
   'enable_encoding'      => 1,
@@ -259,6 +262,38 @@
   $self->{'formatters'}->[-1]->{'_top_formatter'} = 1;
 }
 
+sub _informative_command($$)
+{
+  my $self = shift;
+  my $root = shift;
+  return if ($self->{'set'}->{$root->{'cmdname'}});
+
+  if (exists($root->{'extra'}->{'text'})) {
+    $self->{$root->{'cmdname'}} = $root->{'extra'}->{'text'};
+  } elsif ($misc_commands{$root->{'cmdname'}} eq 'skipline') {
+    $self->{$root->{'cmdname'}} = 1;
+  } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'} 
+           and exists($root->{'extra'}->{'misc_args'}->[0])) {
+    $self->{$root->{'cmdname'}} = $root->{'extra'}->{'misc_args'}->[0];
+    if ($root->{'cmdname'} eq 'paragraphindent') {
+      if ($root->{'extra'}->{'misc_args'}->[0] eq 'asis') {
+        delete $self->{'ignored_types'}->{'empty_spaces_before_paragraph'};
+      } else {
+        $self->{$root->{'cmdname'}} = 0 
+          if ($root->{'extra'}->{'misc_args'}->[0] eq 'none');
+        $self->{'ignored_types'}->{'empty_spaces_before_paragraph'} = 1;
+      }
+    } elsif ($root->{'cmdname'} eq 'documentencoding') {
+      if (defined($root->{'extra'})
+           and defined($root->{'extra'}->{'encoding_alias'})) {
+        $self->{'encoding'} = $root->{'extra'}->{'encoding_alias'};
+      } else {
+        $self->{'encoding'} = undef;
+      }
+    }
+  }
+}
+
 sub converter(;$)
 {
   my $class = shift;
@@ -279,6 +314,9 @@
     $conf = shift;
     $name = ref($converter);
   }
+  foreach my $key (keys(%defaults)) {
+    $converter->{$key} = $defaults{$key};
+  }
   if (defined($conf)) {
     if ($conf->{'parser'}) {
       $converter->{'parser'} = $conf->{'parser'};
@@ -301,6 +339,10 @@
                and $converter->{'structuring'}
                and $converter->{'structuring'}->{'sectioning_root'});
       $converter->{'gettext'} = $converter->{'parser'}->{'gettext'};
+      foreach my $global_command (@informative_global_commands) {
+        
$converter->_informative_command($converter->{'extra'}->{$global_command})
+          if (defined($converter->{'extra'}->{$global_command}));
+      }
       delete $conf->{'parser'};
     }
     foreach my $key (keys(%$conf)) {
@@ -312,9 +354,6 @@
       }
     }
   }
-  foreach my $key (keys(%defaults)) {
-    $converter->{$key} = $defaults{$key} if (!$converter->{'set'}->{$key});
-  }
   if (!defined($converter->{'expanded_formats'})) {
     if ($converter->{'parser'}) {
       $converter->{'expanded_formats'} = 
$converter->{'parser'}->{'expanded_formats'};
@@ -372,7 +411,7 @@
   foreach my $location (@{$locations}) {
     if (defined($location->{'bytes'})) {
       $location->{'bytes'} += $self->{'file_bytes_count'};
-      $self->{'label_locations'}->{$location->{'root'}} = $location->{'root'};
+      push @{$self->{'label_locations'}}, $location;
     }
     if (defined($location->{'lines'} and $location->{'index_entry'})) {
       $self->{'index_entries_line_location'}->{$location->{'index_entry'}} = 
$location;
@@ -446,9 +485,9 @@
   my $container;
   my $container_conf = {
          'max'                 => $self->{'format_context'}->[-1]->{'max'},
-         'frenchspacing'       => $self->{'frenchspacing'},
          'indent_level'        => 
$self->{'format_context'}->[-1]->{'indent_level'}, 
   };
+  $container_conf->{'frenchspacing'} = 1 if ($self->{'frenchspacing'} eq 'on');
   $container_conf->{'counter'} = $self->{'format_context'}->[-1]->{'counter'}
     if (defined($self->{'format_context'}->[-1]->{'counter'}));
   $container_conf->{'debug'} = 1 if ($self->{'debug'});
@@ -604,6 +643,7 @@
     } else {
 
       my $footnotes_node = {
+        'cmdname' => 'node',
         'node_up' => $element->{'extra'}->{'node'},
         'extra' => {'node_content' => 
              address@hidden>{'extra'}->{'node'}->{'extra'}->{'node_content'}},
@@ -614,6 +654,14 @@
     }
     while (@{$self->{'pending_footnotes'}}) {
       my $footnote = shift (@{$self->{'pending_footnotes'}});
+
+      push @$locations, {'bytes' => $bytes_count, 
+           'root' => {'cmdname' => 'anchor',
+                      'extra' => {'node_content' => 
+               
address@hidden>{'extra'}->{'node'}->{'extra'}->{'node_content'}},
+                              {'text' => "-Footnote-$footnote->{'number'}"}]}
+                     }
+        } if ($element);
       # this pushes on 'context', 'format_context' and 'formatters'
       $self->push_top_formatter('footnote');
       my $footnote_text = ' ' x $footnote_indent 
@@ -967,7 +1015,7 @@
     } elsif ($style_map{$command}) {
       if ($code_style_commands{$command}) {
         $formatter->{'code'}++;
-        push @{$formatter->{'frenchspacing_stack'}}, 1;
+        push @{$formatter->{'frenchspacing_stack'}}, 'on';
         $formatter->{'container'}->set_space_protection(undef,
           undef,undef,1);
       }
@@ -995,8 +1043,10 @@
       if ($code_style_commands{$command}) {
         $formatter->{'code'}--;
         pop @{$formatter->{'frenchspacing_stack'}};
+        my $frenchspacing = 0;
+        $frenchspacing = 1 if ($formatter->{'frenchspacing_stack'}->[-1] eq 
'on');
         $formatter->{'container'}->set_space_protection(undef,
-          undef, undef, $formatter->{'frenchspacing_stack'}->[-1]);
+          undef, undef, $frenchspacing);
       }
       $formatter->{'upper_case'}-- if ($upper_case_commands{$command});
       return ($result, {'lines' => $lines_count, 'bytes' => $bytes_count},
@@ -1472,40 +1522,7 @@
     # all the @-commands that have an information for the formatting, like
     # @paragraphindent, @frenchspacing...
     } elsif ($informative_commands{$root->{'cmdname'}}) {
-      if ($root->{'cmdname'} eq 'frenchspacing' and 
-           $root->{'extra'} and $root->{'extra'}->{'misc_args'} and
-           $root->{'extra'}->{'misc_args'}->[0]) {
-        if ($root->{'extra'}->{'misc_args'}->[0] eq 'on') {
-          $self->{$root->{'cmdname'}} = 1 
-            if (!$self->{'set'}->{$root->{'cmdname'}});
-        } elsif ($root->{'extra'}->{'misc_args'}->[0] eq 'off') {
-          $self->{$root->{'cmdname'}} = 0 
-            if (!$self->{'set'}->{$root->{'cmdname'}});
-        }
-      } elsif (exists($root->{'extra'}->{'text'})) {
-        $self->{$root->{'cmdname'}} = $root->{'extra'}->{'text'}
-            if (!$self->{'set'}->{$root->{'cmdname'}});
-      } elsif ($misc_commands{$root->{'cmdname'}} eq 'skipline') {
-        $self->{$root->{'cmdname'}} = 1;
-      } elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'} 
-               and exists($root->{'extra'}->{'misc_args'}->[0])) {
-        if (!$self->{'set'}->{$root->{'cmdname'}}) {
-          $self->{$root->{'cmdname'}} = $root->{'extra'}->{'misc_args'}->[0];
-          if ($root->{'cmdname'} eq 'paragraphindent') {
-            if ($root->{'extra'}->{'misc_args'}->[0] eq 'asis') {
-              delete 
$self->{'ignored_types'}->{'empty_spaces_before_paragraph'};
-            } else {
-              $self->{$root->{'cmdname'}} = 0 
-                if ($root->{'extra'}->{'misc_args'}->[0] eq 'none');
-              $self->{'ignored_types'}->{'empty_spaces_before_paragraph'} = 1;
-            }
-          } elsif ($root->{'cmdname'} eq 'documentencoding') {
-            $self->{'encoding'} = $root->{'extra'}->{'encoding_alias'} 
-              if (defined($root->{'extra'}) 
-                   and defined($root->{'extra'}->{'encoding_alias'}));
-          }
-        }
-      }
+      $self->_informative_command($root);
       return '';
     } else {
       $unknown_command = 1;
@@ -1606,12 +1623,12 @@
         $index++;
       }
     } elsif ($root->{'type'} eq 'frenchspacing') {
-      push @{$formatter->{'frenchspacing_stack'}}, 1;
+      push @{$formatter->{'frenchspacing_stack'}}, 'on';
       $formatter->{'container'}->set_space_protection(undef,
         undef,undef,1);
     } elsif ($root->{'type'} eq 'code') {
       $formatter->{'code'}++;
-      push @{$formatter->{'frenchspacing_stack'}}, 1;
+      push @{$formatter->{'frenchspacing_stack'}}, 'on';
       $formatter->{'container'}->set_space_protection(undef,
         undef,undef,1);
     } elsif ($root->{'type'} eq 'bracketed') {
@@ -1638,13 +1655,17 @@
   if ($root->{'type'}) {
     if ($root->{'type'} eq 'frenchspacing') {
       pop @{$formatter->{'frenchspacing_stack'}};
+      my $frenchspacing = 0;
+      $frenchspacing = 1 if ($formatter->{'frenchspacing_stack'}->[-1] eq 
'on');
       $formatter->{'container'}->set_space_protection(undef,
-        undef, undef, $formatter->{'frenchspacing_stack'}->[-1]);
+        undef, undef, $frenchspacing);
     } elsif ($root->{'type'} eq 'code') {
       $formatter->{'code'}--;
       pop @{$formatter->{'frenchspacing_stack'}};
+      my $frenchspacing = 0;
+      $frenchspacing = 1 if ($formatter->{'frenchspacing_stack'}->[-1] eq 
'on');
       $formatter->{'container'}->set_space_protection(undef,
-        undef, undef, $formatter->{'frenchspacing_stack'}->[-1]);
+        undef, undef, $frenchspacing);
     } elsif ($root->{'type'} eq 'bracketed'
       and $self->{'context'}->[-1] eq 'math') {
       $result .= $formatter->{'container'}->add_text('}');

Index: t/results/macro/macro_in_misc_commands.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/macro/macro_in_misc_commands.pl,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- t/results/macro/macro_in_misc_commands.pl   19 Dec 2010 17:25:08 -0000      
1.41
+++ t/results/macro/macro_in_misc_commands.pl   30 Dec 2010 17:36:51 -0000      
1.42
@@ -3995,6 +3995,51 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':99: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 99,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':100: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 100,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':101: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 101,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':112: warning: Multiple @footnotestyle
+',
+    'file_name' => '',
+    'line_nr' => 112,
+    'macro' => '',
+    'text' => 'Multiple @footnotestyle',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':121: warning: Multiple @frenchspacing
+',
+    'file_name' => '',
+    'line_nr' => 121,
+    'macro' => '',
+    'text' => 'Multiple @frenchspacing',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':149: warning: @page should only appear at a line 
beginning (possibly involving @page-macro)
 ',
     'file_name' => '',

Index: t/results/misc_commands/many_lines.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/misc_commands/many_lines.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- t/results/misc_commands/many_lines.pl       7 Dec 2010 20:34:30 -0000       
1.24
+++ t/results/misc_commands/many_lines.pl       30 Dec 2010 17:36:51 -0000      
1.25
@@ -1610,6 +1610,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':21: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 21,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':22: warning: @paragraphindent should only appear at a 
line beginning
 ',
     'file_name' => '',
@@ -1619,6 +1628,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':22: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 22,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':23: warning: @paragraphindent should only appear at a 
line beginning
 ',
     'file_name' => '',
@@ -1628,6 +1646,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':23: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 23,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':24: warning: @firstparagraphindent should only appear at 
a line beginning
 ',
     'file_name' => '',
@@ -1673,6 +1700,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':28: warning: Multiple @footnotestyle
+',
+    'file_name' => '',
+    'line_nr' => 28,
+    'macro' => '',
+    'text' => 'Multiple @footnotestyle',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':29: warning: @documentencoding should only appear at a 
line beginning
 ',
     'file_name' => '',
@@ -1727,6 +1763,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':32: warning: Multiple @frenchspacing
+',
+    'file_name' => '',
+    'line_nr' => 32,
+    'macro' => '',
+    'text' => 'Multiple @frenchspacing',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':33: warning: @fonttextsize should only appear at a line 
beginning
 ',
     'file_name' => '',

Index: t/results/value/value_in_misc_commands.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/value/value_in_misc_commands.pl,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- t/results/value/value_in_misc_commands.pl   19 Dec 2010 17:25:10 -0000      
1.34
+++ t/results/value/value_in_misc_commands.pl   30 Dec 2010 17:36:51 -0000      
1.35
@@ -3260,6 +3260,42 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':71: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 71,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':72: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 72,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':73: warning: Multiple @paragraphindent
+',
+    'file_name' => '',
+    'line_nr' => 73,
+    'macro' => '',
+    'text' => 'Multiple @paragraphindent',
+    'type' => 'warning'
+  },
+  {
+    'error_line' => ':80: warning: Multiple @footnotestyle
+',
+    'file_name' => '',
+    'line_nr' => 80,
+    'macro' => '',
+    'text' => 'Multiple @footnotestyle',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':88: warning: @documentlanguage should only appear at a 
line beginning
 ',
     'file_name' => '',
@@ -3269,6 +3305,15 @@
     'type' => 'warning'
   },
   {
+    'error_line' => ':97: warning: Multiple @frenchspacing
+',
+    'file_name' => '',
+    'line_nr' => 97,
+    'macro' => '',
+    'text' => 'Multiple @frenchspacing',
+    'type' => 'warning'
+  },
+  {
     'error_line' => ':115: warning: @page should only appear at a line 
beginning
 ',
     'file_name' => '',



reply via email to

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