[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter): se
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Converter.pm (converter): set $converter->{'converter_init_conf'} to the configuration options obtained after setting the defaults and applying the configuration passed as argument. |
Date: |
Thu, 02 Sep 2021 17:44:38 -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 e6940cf * tp/Texinfo/Convert/Converter.pm (converter): set
$converter->{'converter_init_conf'} to the configuration options obtained after
setting the defaults and applying the configuration passed as argument.
e6940cf is described below
commit e6940cf4629baacbcadf425e6031b6295a8984de
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Sep 2 23:44:28 2021 +0200
* tp/Texinfo/Convert/Converter.pm (converter): set
$converter->{'converter_init_conf'} to the configuration
options obtained after setting the defaults and applying
the configuration passed as argument.
* tp/Texinfo/Convert/Converter.pm (_set_global_multiple_commands):
rename $multiple_commands_index as $commands_location.
---
ChangeLog | 10 ++++++++
tp/TODO | 57 +++++++++++++++++++++++++++++++++++++++++
tp/Texinfo/Convert/Converter.pm | 27 ++++++++++++++-----
3 files changed, 87 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8d643f8..e1dbb50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2021-09-02 Patrice Dumas <pertusus@free.fr>
+ * tp/Texinfo/Convert/Converter.pm (converter): set
+ $converter->{'converter_init_conf'} to the configuration
+ options obtained after setting the defaults and applying
+ the configuration passed as argument.
+
+ * tp/Texinfo/Convert/Converter.pm (_set_global_multiple_commands):
+ rename $multiple_commands_index as $commands_location.
+
+2021-09-02 Patrice Dumas <pertusus@free.fr>
+
* tp/Texinfo/Common.pm, tp/Texinfo/Convert/Converter.pm,
tp/texi2any.pl: add more default values for command
line options and customizations, separating specific main
diff --git a/tp/TODO b/tp/TODO
index a244e7b..c488f7e 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -13,6 +13,63 @@ xmllint --nonet --noout --valid commands.xml
Before next release
===================
+Rename _set_global_multiple_commands and $multiple_commands_index
+
+Real API for Texinfo::Config used in html32.pm.
+
+CHECK_NORMAL_MENU_STRUCTURE devien argument de la fonction
+
+renommer formatting_commands no_arg_commands ou approchant
+
+remettre libint-perl
+
+
+do not remove documentlanguage in index entries
+
+check @{$converter_options->{'INCLUDE_DIRECTORIES'}} with more
+than one output file
+FIXME isn't that done for each output file?
+
+
+remove NODE_FILENAMES
+vi init/book.pm
+ return undef if ($converter->get_conf('NODE_FILENAMES')
++ COmmon.pm
+
+
+COmmon.pm float_name_caption to Convert::Common
+ sub definition_category($$) to Convert::Common
+ expand_today to Convert::Common
+translated_command_tree Convert::Common
+numbered_heading Convert::Common
+definition_arguments_content Convert::Common
+find_innermost_accent_contents Convert::Common
+
+float_name_caption Convert::Converter
+
+trim_spaces_comment_from_content ?
+
+count_bytes ?
+
+_count_opened_tree_braces _find_end_brace parse_node_manual remains in Common
+enumerate_item_representation
+is_content_empty
+normalize_top_node_name
+_convert_text_options
+
+protect_colon_in_tree modify_tree substitute_references
collect_commands_list_in_tree collect_commands_in_tree _copy_tree copy_tree
remains in Common
+need _new_asis_command_with_text or _protect_text
+protect_node_after_label_in_tree
+protect_first_parenthesis
+
+
+protect_hashchar_at_line_beginning Transformations
+
+set_nodes_list_labels to NodeNameNormalization
+
+
+complete_indices, gdt, some code in Text: add documentlanguage arg to gdt
+move complete_indices to Translations
Bugs
====
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 5d028a6..54b2b33 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -178,7 +178,7 @@ sub converter(;$)
$converter->{$key} = $defaults{$key};
}
}
- $converter->{'converter_init_conf'} = \%defaults;
+ #$converter->{'converter_pre_conf'} = \%defaults;
if (defined($conf)) {
if ($conf->{'parser'}) {
$converter->{'parser'} = $conf->{'parser'};
@@ -206,6 +206,19 @@ sub converter(;$)
$converter->{'set'}->{$key} = 1;
}
}
+ # set $converter->{'converter_init_conf'} to the configuration
+ # options obtained after setting the defaults and applying
+ # the configuration passed as argument.
+ $converter->{'converter_init_conf'} = {};
+ foreach my $key (keys(%{$converter->{'conf'}})) {
+ $converter->{'converter_init_conf'}->{$key} = $converter->{'conf'}->{$key};
+ }
+ foreach my $key (keys (%defaults)) {
+ if (defined($converter->{$key})) {
+ $converter->{'converter_init_conf'}->{$key} = $converter->{$key};
+ }
+ }
+
$converter->set_conf('OUTPUT_ENCODING_NAME',
$converter->{'parser_info'}->{'input_encoding_name'})
if ($converter->{'parser_info'}->{'input_encoding_name'});
@@ -244,7 +257,7 @@ sub output_files_information($)
return $self->{'output_files'};
}
-# $MULTIPLE_COMMANDS_INDEX is 0, 1 or -1.
+# $COMMANDS_LOCATION is 0, 1 or -1.
# 0 means setting to the values before the document commands
# (default and command-line).
# 1 means setting to the first value for the command in the document
@@ -261,7 +274,7 @@ sub output_files_information($)
sub _set_global_multiple_commands($$)
{
my $self = shift;
- my $multiple_commands_index = shift;
+ my $commands_location = shift;
my $init_conf;
if (defined($self->{'output_init_conf'})) {
@@ -281,7 +294,7 @@ sub _set_global_multiple_commands($$)
$Texinfo::Common::document_settable_at_commands{$global_command};
}
}
- if ($multiple_commands_index == 0) {
+ if ($commands_location == 0) {
foreach my $global_command (keys(%{$commands_init})) {
# for commands not appearing in the document, this should set the
# same value, the converter initialization value
@@ -292,9 +305,9 @@ sub _set_global_multiple_commands($$)
my $root;
if (defined($self->{'extra'}->{$global_command})
and ref($self->{'extra'}->{$global_command}) eq 'ARRAY') {
- # used when $multiple_commands_index == 1
+ # used when $commands_location == 1
my $index_in_global_commands = 0;
- if ($multiple_commands_index < 0) {
+ if ($commands_location < 0) {
$index_in_global_commands = -1;
}
$root =
$self->{'extra'}->{$global_command}->[$index_in_global_commands];
@@ -303,7 +316,7 @@ sub _set_global_multiple_commands($$)
$root = $self->{'extra'}->{$global_command};
}
if ($self->get_conf('DEBUG')) {
- print STDERR "SET_global_multiple_commands($multiple_commands_index)
$global_command\n";
+ print STDERR "SET_global_multiple_commands($commands_location)
$global_command\n";
}
if (defined($root)) {
$self->_informative_command($root);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Converter.pm (converter): set $converter->{'converter_init_conf'} to the configuration options obtained after setting the defaults and applying the configuration passed as argument.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/Info.pm (_info_header) move _set_global_multiple_commands() call closer to the line where they are used and add a comment.
- Next by Date:
branch master updated: * tp/Texinfo/Common.pm (%default_main_program_command_line_options), tp/Texinfo/Config.pm (GNUT_set_main_program_default, Texinfo::MainConfig, new, get_conf, set_conf), texi2any.pl: add a scope with functions that mimics parser or converter with get_conf() and set_conf() methods, have access to Texinfo::Config informations. This allows to set a $main_configuration object in main program that is passed to functions that need information. Used in tests too, simply setting a hash reference a [...]
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/Info.pm (_info_header) move _set_global_multiple_commands() call closer to the line where they are used and add a comment.
- Next by thread:
branch master updated: * tp/Texinfo/Common.pm (%default_main_program_command_line_options), tp/Texinfo/Config.pm (GNUT_set_main_program_default, Texinfo::MainConfig, new, get_conf, set_conf), texi2any.pl: add a scope with functions that mimics parser or converter with get_conf() and set_conf() methods, have access to Texinfo::Config informations. This allows to set a $main_configuration object in main program that is passed to functions that need information. Used in tests too, simply setting a hash reference a [...]
- Index(es):