texinfo-commits
[Top][All Lists]
Advanced

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

[7386] remove _check_contents_location


From: gavinsmith0123
Subject: [7386] remove _check_contents_location
Date: Mon, 19 Sep 2016 15:25:25 +0000 (UTC)

Revision: 7386
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7386
Author:   gavin
Date:     2016-09-19 15:25:25 +0000 (Mon, 19 Sep 2016)
Log Message:
-----------
remove _check_contents_location

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2016-09-19 15:22:14 UTC (rev 7385)
+++ trunk/ChangeLog     2016-09-19 15:25:25 UTC (rev 7386)
@@ -1,5 +1,10 @@
 2016-09-19  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_check_contents_location): Remove unused 
+       function.
+
+2016-09-19  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/Parser.pm (_parse_special_misc_command): Change
        "a @-command" to "an @-command" in a message.
        (_parse_line_command_args): Comment changed.

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2016-09-19 15:22:14 UTC (rev 7385)
+++ trunk/tp/Texinfo/Parser.pm  2016-09-19 15:25:25 UTC (rev 7386)
@@ -845,49 +845,6 @@
   return $tree;
 }
 
-# Not used for now, as a @contents after the first sectioning command
-# is correct if not using TeX.
-sub _check_contents_location($$)
-{
-  my $self = shift;
-  my $tree = shift;
-
-  my $commands = $self->global_commands_information();
-  return unless ($commands);
-  # Find the last sectioning command
-  my $index = -1;
-  my %ending_root_commands;
-  my $found = 0;
-  while ($tree->{'contents'}->[$index]) {
-    if (defined($tree->{'contents'}->[$index]->{'cmdname'})) {
-      $ending_root_commands{$tree->{'contents'}->[$index]} = 1;
-      if ($sectioning_commands{$tree->{'contents'}->[$index]->{'cmdname'}}) {
-        $found = 1;
-        last;
-      }
-    }
-    $index--;
-  }
-  return if (!$found);
-
-  #print STDERR "ending_root_commands 
".join('|',keys(%ending_root_commands))."\n";
-  #print STDERR "tree contents: ".join('|', @{$tree->{'contents'}})."\n";
-  foreach my $command ('contents', 'shortcontents', 'summarycontents') {
-    if ($commands->{$command}) {
-      foreach my $current (@{$commands->{$command}}) {
-        my $root_command = 
$self->Texinfo::Common::find_parent_root_command($current);
-        #print STDERR "root_command for $current->{'cmdname'}: 
$root_command\n";
-        if (defined($root_command) 
-            and !$ending_root_commands{$root_command}) {
-          $self->line_warn(sprintf($self->__(
-                  "address@hidden should only appear at beginning or end of 
document"),
-                            $current->{'cmdname'}), $current->{'line_nr'});    
                   
-        }
-      }
-    }
-  }
-}
-
 # parse a texi file
 sub parse_texi_file($$)
 {




reply via email to

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