texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Small changes: reindent, change in comments


From: Patrice Dumas
Subject: branch master updated: Small changes: reindent, change in comments
Date: Sat, 13 Aug 2022 15:55:27 -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 df9d65363b Small changes: reindent, change in comments
df9d65363b is described below

commit df9d65363b4482c2364a80acf3f9982aae8a6ef2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 13 21:54:52 2022 +0200

    Small changes: reindent, change in comments
---
 doc/tp_api/Makefile.am        |  7 -------
 tp/Texinfo/Transformations.pm | 13 ++++++++++---
 tp/t/10menu.t                 |  4 +++-
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/doc/tp_api/Makefile.am b/doc/tp_api/Makefile.am
index 46e0e87795..57e1b2d4f4 100644
--- a/doc/tp_api/Makefile.am
+++ b/doc/tp_api/Makefile.am
@@ -43,13 +43,6 @@ EXTRA_DIST = api_includes
 
 if BUILD_PERL_API_TEXI
 
-# dist_info_TEXINFOS does not seems to be used in the resulting Makefile.in
-#dist_info_TEXINFOS = tp_api.texi
-# in 2022 an info_TEXINFOS variable is not allowed in a conditional, and
-# in addition we want the build targets to be available even when the
-# texinfo sources cannot be rebuilt.
-#info_TEXINFOS = tp_api.texi
-
 BUILT_SOURCES = tp_api.texi
 
 # all the modules with some interesting public interfaces.
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index 7deebf950d..f4bc085d17 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -385,7 +385,8 @@ sub complete_node_menu($;$)
   my $node = shift;
   my $use_sections = shift;
 
-  my @node_childs = 
Texinfo::Structuring::get_node_node_childs_from_sectioning($node);
+  my @node_childs
+      = Texinfo::Structuring::get_node_node_childs_from_sectioning($node);
 
   if (scalar(@node_childs)) {
     my %existing_entries;
@@ -487,9 +488,11 @@ sub complete_tree_nodes_missing_menu($;$)
 
   my $non_automatic_nodes = _get_non_automatic_nodes_with_sections($root);
   foreach my $node (@{$non_automatic_nodes}) {
-    if (not $node->{'extra'}->{'menus'} or not 
scalar(@{$node->{'extra'}->{'menus'}})) {
+    if (not $node->{'extra'}->{'menus'}
+        or not scalar(@{$node->{'extra'}->{'menus'}})) {
       my $section = $node->{'extra'}->{'associated_section'};
-      my $current_menu = Texinfo::Structuring::new_complete_node_menu($node, 
$use_sections);
+      my $current_menu
+        = Texinfo::Structuring::new_complete_node_menu($node, $use_sections);
       if (defined($current_menu)) {
         _prepend_new_menu_in_node_section($node, $section, $current_menu);
       }
@@ -666,12 +669,15 @@ sub regenerate_master_menu($$)
       and $last_menu->{'contents'}->[$index-1]->{'contents'}->[-1]->{'type'}
       and $last_menu->{'contents'}->[$index-1]->{'contents'}->[-1]->{'type'}
              eq 'preformatted') {
+    # there is already a menu comment at the end of the menu, add an empty line
     my $empty_line = {'type' => 'empty_line', 'text' => "\n", 'parent' =>
                $last_menu->{'contents'}->[$index-1]->{'contents'}->[-1]};
     push @{$last_menu->{'contents'}->[$index-1]->{'contents'}}, $empty_line;
   } elsif ($index
            and $last_menu->{'contents'}->[$index-1]->{'type'}
            and $last_menu->{'contents'}->[$index-1]->{'type'} eq 'menu_entry') 
{
+    # there is a last menu entry, add a menu comment containing an empty line
+    # after it
     my $menu_comment = {'type' => 'menu_comment', 'parent' => $last_menu};
     splice (@{$last_menu->{'contents'}}, $index, 0, $menu_comment);
     $index++;
@@ -681,6 +687,7 @@ sub regenerate_master_menu($$)
                       'parent' => $preformatted};
     push @{$preformatted->{'contents'}}, $empty_line;
   }
+  # insert master menu
   splice (@{$last_menu->{'contents'}}, $index, 0, $new_master_menu);
 
   return 1;
diff --git a/tp/t/10menu.t b/tp/t/10menu.t
index 7109628e3c..32db45ff38 100644
--- a/tp/t/10menu.t
+++ b/tp/t/10menu.t
@@ -197,7 +197,9 @@ Chap 2
 @end detailmenu
 @end menu
 '],
-['missing_detailmenu_on_subnodes',
+['missing_detailmenu_on_subnodes', # same as above, but without detailmenu
+                                   # such that subnode menu entries appear
+                                   # in the Top node menu
 '@node Top
 @top top
 



reply via email to

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