texinfo-commits
[Top][All Lists]
Advanced

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

[8302] _register_global_command


From: gavinsmith0123
Subject: [8302] _register_global_command
Date: Wed, 17 Oct 2018 07:07:09 -0400 (EDT)

Revision: 8302
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8302
Author:   gavin
Date:     2018-10-17 07:07:09 -0400 (Wed, 17 Oct 2018)
Log Message:
-----------
_register_global_command

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2018-10-17 10:59:22 UTC (rev 8301)
+++ trunk/ChangeLog     2018-10-17 11:07:09 UTC (rev 8302)
@@ -1,5 +1,10 @@
 2018-10-17  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_register_global_command): Remove an 
+       argument.  Callers updated.
+
+2018-10-17  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/Common.pm (labels_information): Avoiding creating 
        'extra' hash by mistake.
 

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2018-10-17 10:59:22 UTC (rev 8301)
+++ trunk/tp/Texinfo/Parser.pm  2018-10-17 11:07:09 UTC (rev 8302)
@@ -1019,10 +1019,11 @@
   return Texinfo::Common::print_tree($tree);
 }
 
-sub _register_global_command($$$$)
-{
-  my ($self, $command, $current, $line_nr) = @_;
+sub _register_global_command {
+  my ($self, $current, $line_nr) = @_;
 
+  my $command = $current->{'cmdname'};
+
   if ($command eq 'summarycontents' and 
!$self->{'global_commands'}->{$command}) {
     $command = 'shortcontents';
   }
@@ -4153,7 +4154,7 @@
               push @{$current->{'contents'}}, $misc;
               # also sets invalid_nesting in that case
               $misc->{'extra'}->{'invalid_nesting'} = 1 if ($only_in_headings);
-              _register_global_command($self, $command, $misc, $line_nr);
+              _register_global_command($self, $misc, $line_nr);
             }
             _mark_and_warn_invalid($self, $command, $invalid_parent,
                                    $line_nr, $misc);
@@ -4229,7 +4230,7 @@
             }
             _mark_and_warn_invalid($self, $command, $invalid_parent,
                                    $line_nr, $misc);
-            _register_global_command($self, $command, $misc, $line_nr);
+            _register_global_command($self, $misc, $line_nr);
             # the end of line is ignored for special commands
             if ($arg_spec ne 'special' or !$has_comment) {
               $current = _end_line($self, $current, $line_nr);
@@ -4459,7 +4460,7 @@
           _mark_and_warn_invalid($self, $command, $invalid_parent,
                                  $line_nr, $misc);
 
-          _register_global_command($self, $command, $misc, $line_nr)
+          _register_global_command($self, $misc, $line_nr)
             if $misc;
           if ($command eq 'dircategory') {
             push @{$self->{'info'}->{'dircategory_direntry'}}, $misc;
@@ -4682,7 +4683,7 @@
             $block->{'line_nr'} = $line_nr;
             _mark_and_warn_invalid($self, $command, $invalid_parent,
                                    $line_nr, $block);
-            _register_global_command($self, $command, $block, $line_nr);
+            _register_global_command($self, $block, $line_nr);
 
             $line = _start_empty_line_after_command($line, $current, $block);
           }
@@ -5066,8 +5067,7 @@
                 }
               }
             }
-            _register_global_command($self, $current->{'parent'}->{'cmdname'},
-                                     $current->{'parent'}, $line_nr);
+            _register_global_command($self, $current->{'parent'}, $line_nr);
             if 
($command_ignore_space_after{$current->{'parent'}->{'cmdname'}}) {
               push @{$current->{'parent'}->{'parent'}->{'contents'}}, 
                  {'type' => 'empty_spaces_after_close_brace',
@@ -5099,9 +5099,7 @@
               }
               print STDERR "CLOSING(context command) 
address@hidden>{'parent'}->{'cmdname'}\n" if ($self->{'DEBUG'});
               my $closed_command = $current->{'parent'}->{'cmdname'};
-              _register_global_command($self,
-                                       $current->{'parent'}->{'cmdname'},
-                                       $current->{'parent'}, $line_nr);
+              _register_global_command($self, $current->{'parent'}, $line_nr);
               $current = $current->{'parent'}->{'parent'};
               $current = _begin_preformatted ($self, $current)
                  if ($close_preformatted_commands{$closed_command});




reply via email to

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