[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Thu, 25 Jan 2024 17:14:22 -0500 (EST) |
branch: master
commit 5c39f8205b3efa2d18fc58a62dbc7150b3411e2b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 25 15:30:42 2024 +0100
* Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree),
tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value
from Texinfo::Transformations::insert_nodes_for_sectioning_commands.
* tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value
from Texinfo::Transformations::fill_gaps_in_sectioning.
Update POD documentation.
---
ChangeLog | 11 +++++++++++
Pod-Simple-Texinfo/pod2texi.pl | 3 +--
tp/Texinfo/Common.pm | 2 +-
tp/Texinfo/Convert/Converter.pm | 2 +-
tp/Texinfo/Convert/Utils.pm | 2 +-
tp/Texinfo/Document.pm | 14 ++++----------
tp/Texinfo/ParserNonXS.pm | 3 +--
tp/Texinfo/Report.pm | 7 +++----
tp/Texinfo/Transformations.pm | 13 ++++++-------
tp/Texinfo/Translations.pm | 15 +++++++++------
tp/t/test_fill_gaps_in_sectioning.t | 4 +---
tp/t/test_utils.pl | 9 ++-------
tp/texi2any.pl | 10 ++--------
13 files changed, 43 insertions(+), 52 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index daa1af780a..90a7043367 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-01-25 Patrice Dumas <pertusus@free.fr>
+
+ * Pod-Simple-Texinfo/pod2texi.pl (_parsed_manual_tree),
+ tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value
+ from Texinfo::Transformations::insert_nodes_for_sectioning_commands.
+
+ * tp/t/test_utils.pl (test), tp/texi2any.pl: do not get a return value
+ from Texinfo::Transformations::fill_gaps_in_sectioning.
+
+ Update POD documentation.
+
2024-01-25 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XSLoader.pm (init): simply use _fatal if the libtool name
diff --git a/Pod-Simple-Texinfo/pod2texi.pl b/Pod-Simple-Texinfo/pod2texi.pl
index d2f9893091..86bf183076 100755
--- a/Pod-Simple-Texinfo/pod2texi.pl
+++ b/Pod-Simple-Texinfo/pod2texi.pl
@@ -302,8 +302,7 @@ sub _parsed_manual_tree($$$$$)
Texinfo::Transformations::fill_gaps_in_sectioning($tree,
$commands_heading_content);
if ($section_nodes) {
- my $added_nodes
- = Texinfo::Transformations::insert_nodes_for_sectioning_commands(
+ Texinfo::Transformations::insert_nodes_for_sectioning_commands(
$document, $registrar,
$texi_parser);
$document = Texinfo::Document::rebuild_document($document);
}
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 8c2c7ddb21..aed460ed6d 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -2907,7 +2907,7 @@ Return true if the I<$tree> has content that could be
formatted.
I<$do_not_ignore_index_entries> is optional. If set, index entries
are considered to be formatted.
-=item $file = locate_include_file($customization_information, file_path)
+=item $file = locate_include_file($customization_information, $file_path)
X<C<locate_include_file>>
Locate I<$file_path>. If I<$file_path> is an absolute path or has C<.>
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 5648706a77..5d271a37c5 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -2564,7 +2564,7 @@ used to encode the name. The C<encoded_input_file_name>
and
C<encoded_output_file_name> functions use different customization variables to
determine the encoding.
-The <$input_file_encoding> argument is optional. If set, it is used for
+The I<$input_file_encoding> argument is optional. If set, it is used for
the input file encoding. It is useful if there is more precise information
on the input file encoding where the file name appeared.
diff --git a/tp/Texinfo/Convert/Utils.pm b/tp/Texinfo/Convert/Utils.pm
index 2784317281..03fa74e600 100644
--- a/tp/Texinfo/Convert/Utils.pm
+++ b/tp/Texinfo/Convert/Utils.pm
@@ -635,7 +635,7 @@ determine the encoding. The I<$converter> argument is not
optional
and is used both to access to customization variables and to access to parser
information.
-The <$input_file_encoding> argument is optional. If set, it is used for
+The I<$input_file_encoding> argument is optional. If set, it is used for
the input file encoding. It is useful if there is more precise information
on the input file encoding where the file name appeared.
diff --git a/tp/Texinfo/Document.pm b/tp/Texinfo/Document.pm
index d8c65805b9..adf1b3ae03 100644
--- a/tp/Texinfo/Document.pm
+++ b/tp/Texinfo/Document.pm
@@ -370,11 +370,6 @@ This module is used to represent parsed Texinfo documents,
with the Texinfo
tree and associated information. In general a document is obtained from
a Texinfo parser call, there is no need to setup the document.
-If the document comes from the XS parser, other XS module can retrieve data
-structures associated to the document object, by using information carried
-by the object. This is not relevant for perl code and is not documented
-here.
-
=head1 METHODS
The main purpose of Texinfo::Document methods is to retrieve information
@@ -485,14 +480,13 @@ Internal references, nodes and section lists may also be
available.
=item $internal_references_array = internal_references_information($document)
X<C<internal_references_information>>
-The function returns an aray reference of cross-reference commands referring to
-the same document with @-commands that refer to node, anchors
-or floats.
+The function returns an array reference of cross-reference commands referring
+to the same document with @-commands that refer to node, anchors or floats.
=item $nodes_list = nodes_list($document)
-Returns an array reference containing the document nodes. In general set to
the
-nodes list returned by L<Texinfo::Structuring
nodes_tree|Texinfo::Structuring/$nodes_list = nodes_tree($document, $registrar,
$customization_information)>,
+Returns an array reference containing the document nodes. In general set to
+the nodes list returned by L<Texinfo::Structuring
nodes_tree|Texinfo::Structuring/$nodes_list = nodes_tree($document, $registrar,
$customization_information)>,
by a call to L<register_document_nodes_list|/register_document_nodes_list
($document, $nodes_list)>.
=item $sections_list = sections_list($document)
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 98040bde43..20c0561cca 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -116,7 +116,6 @@ sub import {
parse_texi_line
parse_texi_piece
parse_texi_text
-
) ] );
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@@ -7989,7 +7988,7 @@ The following method is used to construct a new
C<Texinfo::Parser> object:
=over
-=item $parser = Texinfo::Parser::parser($options);
+=item $parser = Texinfo::Parser::parser($options)
X<C<Texinfo::Parser::parser>>
X<Parser initialization>
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 368aa6e766..7f2f29cba2 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -285,16 +285,15 @@ methods allow registering errors and warnings.
=item my $registrar = Texinfo::Report::new()
-=item $converter->Texinfo::Report::new()
+=item $object->Texinfo::Report::new()
X<C<Texinfo::Report::new>>
If called without argument, a C<Texinfo::Report> object is initialized and
returned. This is how the module is used in the Texinfo Parsers, as
a separate object.
-If called on a C<$converter>, the C<$converter> is initialized itself
-such as to be able to call C<Texinfo::Report> methods. It is how it is
-used in the Converters.
+If called on an object C<$object>, the C<$object> is initialized itself
+such as to be able to call C<Texinfo::Report> methods.
=item ($error_warnings_list, $error_count) = errors($registrar)
X<C<errors>>
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index 451eb167ac..f28b4de9a9 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -978,15 +978,13 @@ C<$add_section_names_in_entries> argument is set, a menu
entry
name is added using the section name. This function should be
called after L<sectioning_structure|Texinfo::Structuring/$sections_list =
sectioning_structure($tree, $registrar, $customization_information)>.
-=item $added_sections = fill_gaps_in_sectioning($tree,
$commands_heading_content)
+=item fill_gaps_in_sectioning($tree, $commands_heading_tree)
X<C<fill_gaps_in_sectioning>>
This function adds empty C<@unnumbered> and similar commands in a tree
to fill gaps in sectioning. This may be used, for example, when converting
from a format that can handle gaps in sectioning. I<$tree> is the tree
-root, which is modified by adding the new sectioning commands. An array
-reference is returned, containing the added sectioning commands, or
-undef if there was no sectioning command at all in the tree root.
+root, which is modified by adding the new sectioning commands.
In the default case, the added sectioning commands headings are empty. It is
possible to use instead the I<$commands_heading_tree> Texinfo tree element.
@@ -995,7 +993,7 @@ If the sectioning commands are lowered or raised (with
C<@raisesections>,
C<@lowersection>) the tree may be modified with C<@raisesections> or
C<@lowersection> added to some tree elements.
-=item $added_nodes = insert_nodes_for_sectioning_commands($document,
$registrar, $customization_information)
+=item insert_nodes_for_sectioning_commands($document, $registrar,
$customization_information)
X<C<insert_nodes_for_sectioning_commands>>
Insert nodes for sectioning commands without node in C<$document>
@@ -1004,8 +1002,6 @@ defined they are used for error reporting, though there
should not
be any errors as the node names are adapted such as not to clash with
existing label targets.
-An array reference is returned containing the added nodes.
-
=item menu_to_simple_menu($menu)
=item set_menus_to_simple_menu($nodes_list)
@@ -1045,6 +1041,9 @@ reference @-command from constructed node names trees, as
node names cannot
contain reference @-command while there could be some in the tree used in input
for the node name tree.
+A I<$modified_tree> is not systematically returned, if the I<$tree> in argument
+is not replaced, undef may also be returned.
+
=item regenerate_master_menu($customization_information, $identifier_target)
X<C<regenerate_master_menu>>
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index b450fcd854..b370b54efe 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -638,13 +638,16 @@ X<C<gdt>> X<C<gdt_string>>
The I<$string> is a string to be translated. With C<gdt>
the function returns a Texinfo tree, as the string is interpreted
as Texinfo code after translation. With C<gdt_string> a string
-is returned. I<$replaced_substrings> is an optional hash reference specifying
+is returned.
+
+I<$replaced_substrings> is an optional hash reference specifying
some substitution to be done after the translation. The key of the
-I<$replaced_substrings> hash reference identifies what is to be substituted,
-and the value is, for C<gdt>, some string, texinfo tree or array content
-that is substituted in the resulting texinfo tree. The substitutions may only
-be strings with C<gdt_string>. In the string to be translated word in brace
-matching keys of I<$replaced_substrings> are replaced.
+I<$replaced_substrings> hash reference identifies what is to be substituted.
+In the string to be translated word in brace matching keys of
+I<$replaced_substrings> are replaced.
+For C<gdt>, the value is a Texinfo tree that is substituted in the
+resulting texinfo tree. For C<gdt_string>, the value is a string that
+is replaced in the resulting string.
The I<$object> is typically a converter, but can be any object that implements
C<get_conf>, or undefined (C<undef>). If not undefined, the information in the
diff --git a/tp/t/test_fill_gaps_in_sectioning.t
b/tp/t/test_fill_gaps_in_sectioning.t
index a63c6c66b2..d6c2ef765a 100644
--- a/tp/t/test_fill_gaps_in_sectioning.t
+++ b/tp/t/test_fill_gaps_in_sectioning.t
@@ -26,8 +26,7 @@ sub test_correction($$$;$)
my $tree = $document->tree();
if (! defined($test_correct_level)) {
- my $added_sections
- = Texinfo::Transformations::fill_gaps_in_sectioning($tree);
+ Texinfo::Transformations::fill_gaps_in_sectioning($tree);
} else {
# If set to 0, undef to mimic not giving the argument
$test_correct_level = undef if (!$test_correct_level);
@@ -48,7 +47,6 @@ sub test_correction($$$;$)
#local $Data::Dumper::Maxdepth = 2;
local $Data::Dumper::Indent = 1;
#print STDERR Data::Dumper->Dump([$tree]);
- #print STDERR Data::Dumper->Dump([$added_sections]);
}
my $texi_result
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 653359971d..a506e9d829 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -1051,11 +1051,7 @@ sub test($$)
}
if ($tree_transformations{'fill_gaps_in_sectioning'}) {
- my $added_sections
- = Texinfo::Transformations::fill_gaps_in_sectioning($tree);
- if (!defined($added_sections)) {
- warn "$test_name: fill_gaps_in_sectioning transformation return no
result. No section?\n";
- }
+ Texinfo::Transformations::fill_gaps_in_sectioning($tree);
}
my $document_information = $document->global_information();
@@ -1081,8 +1077,7 @@ sub test($$)
}
if ($tree_transformations{'insert_nodes_for_sectioning_commands'}) {
- my $added_nodes
- = Texinfo::Transformations::insert_nodes_for_sectioning_commands(
+ Texinfo::Transformations::insert_nodes_for_sectioning_commands(
$document, $registrar, $main_configuration);
}
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 806e785679..5054b3896b 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1490,12 +1490,7 @@ while(@input_files) {
if ($tree_transformations{'fill_gaps_in_sectioning'}) {
- my $added_sections
- = Texinfo::Transformations::fill_gaps_in_sectioning($tree);
- if (!defined($added_sections)) {
- document_warn(__(
- "fill_gaps_in_sectioning transformation return no result. No
section?"));
- }
+ Texinfo::Transformations::fill_gaps_in_sectioning($tree);
}
my $identifier_target = $document->labels_information();
@@ -1584,8 +1579,7 @@ while(@input_files) {
}
if ($tree_transformations{'insert_nodes_for_sectioning_commands'}) {
- my $added_nodes
- =
Texinfo::Transformations::insert_nodes_for_sectioning_commands($document,
+ Texinfo::Transformations::insert_nodes_for_sectioning_commands($document,
$registrar,
$main_configuration);
}