texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/DebugTexinfo/DebugTree.pm (_print_tree): rem


From: Patrice Dumas
Subject: branch master updated: * tp/DebugTexinfo/DebugTree.pm (_print_tree): remove self argument, unused.
Date: Sun, 22 Oct 2023 13:47:45 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 36bd5b5dc5 * tp/DebugTexinfo/DebugTree.pm (_print_tree): remove self 
argument, unused.
36bd5b5dc5 is described below

commit 36bd5b5dc5a71cbb088875ac8fedf475c01deef3
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Oct 22 19:47:45 2023 +0200

    * tp/DebugTexinfo/DebugTree.pm (_print_tree): remove self argument,
    unused.
---
 ChangeLog                    |  5 +++++
 tp/DebugTexinfo/DebugTree.pm | 29 ++++++++++++++---------------
 tp/Texinfo/Common.pm         |  2 +-
 3 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e566fb253f..fa01923309 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-22  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/DebugTexinfo/DebugTree.pm (_print_tree): remove self argument,
+       unused.
+
 2023-10-22  Patrice Dumas  <pertusus@free.fr>
 
        * tp/DebugTexinfo/DebugTree.pm (output): never generate output units,
diff --git a/tp/DebugTexinfo/DebugTree.pm b/tp/DebugTexinfo/DebugTree.pm
index 5431ad1d61..9762dc394f 100644
--- a/tp/DebugTexinfo/DebugTree.pm
+++ b/tp/DebugTexinfo/DebugTree.pm
@@ -1,4 +1,4 @@
-# DebugTexinfo::DebugTree.pm: debug a Texinfo tree.
+# DebugTree.pm: debug a Texinfo tree.
 #
 # Copyright 2011-2023 Free Software Foundation, Inc.
 #
@@ -17,7 +17,7 @@
 #
 # Original author: Patrice Dumas <pertusus@free.fr>
 
-# Example of calls
+# Example of call
 # ./texi2any.pl --set TEXINFO_OUTPUT_FORMAT=debugtree file.texi
 #
 # Some unofficial info about the --debug command line option ... with
@@ -31,10 +31,9 @@ package DebugTexinfo::DebugTree;
 
 # also for __(
 use Texinfo::Common;
-use Texinfo::Structuring;
 use Texinfo::Convert::Converter;
 
-use vars qw($VERSION @ISA);
+use vars qw(@ISA);
 @ISA = qw(Texinfo::Convert::Converter);
 
 my %defaults = (
@@ -81,7 +80,7 @@ sub output($$)
       return undef;
     }
   }
-  my $result = $self->write_or_return(_print_tree($self, $root), $fh);
+  my $result = $self->write_or_return(_print_tree($root), $fh);
   # NOTE that we close STDOUT too here
   if ($fh) {
     Texinfo::Common::output_files_register_closed(
@@ -103,7 +102,7 @@ sub convert($$)
 
   my $root = $document->tree();
 
-  return _print_tree($self, $root);
+  return _print_tree($root);
 }
 
 sub convert_tree($$)
@@ -111,11 +110,9 @@ sub convert_tree($$)
   my $self = shift;
   my $root = shift;
 
-  return _print_tree($self, $root);
+  return _print_tree($root);
 }
 
-sub _print_tree($$;$$);
-
 sub _protect_text($)
 {
   my $text = shift;
@@ -125,12 +122,14 @@ sub _protect_text($)
   return $text;
 }
 
-sub _print_tree($$;$$)
+sub _print_tree($;$$);
+
+sub _print_tree($;$$)
 {
-  my $self = shift;
   my $element = shift;
   my $level = shift;
   my $argument = shift;
+
   $level = 0 if (!defined($level));
 
   my $result = ' ' x $level;
@@ -164,17 +163,17 @@ sub _print_tree($$;$$)
   if ($element->{'info'}
       and defined($element->{'info'}->{'comment_at_end'})) {
     $result .= ' ' x ($level + 1).'/comment_at_end/'."\n";
-    $result .= _print_tree ($self, $element->{'info'}->{'comment_at_end'},
-                            $level +2);
+    $result .= _print_tree($element->{'info'}->{'comment_at_end'},
+                           $level +2);
   }
   if ($element->{'args'}) {
     foreach my $arg (@{$element->{'args'}}) {
-      $result .= _print_tree ($self, $arg, $level +1, 1);
+      $result .= _print_tree($arg, $level +1, 1);
     }
   }
   if ($element->{'contents'}) {
     foreach my $content (@{$element->{'contents'}}) {
-      $result .= _print_tree ($self, $content, $level+1);
+      $result .= _print_tree($content, $level+1);
     }
   }
   return $result;
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 27bcfbcb06..1054f863a9 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1,4 +1,4 @@
-# Common.pm: definition of commands. Common code of other Texinfo modules.
+# Common.pm: Common code of other Texinfo modules.
 #
 # Copyright 2010-2023 Free Software Foundation, Inc.
 #



reply via email to

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