[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/texi2any.pl: set also PACKAGE*_CONFIG to hav
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same symbols defined as in C. |
Date: |
Sun, 28 Jan 2024 14:53:51 -0500 |
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 332aae698a * tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same
symbols defined as in C.
332aae698a is described below
commit 332aae698af2623b9b90e667f071e7cf1af6b87d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 28 20:53:43 2024 +0100
* tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same symbols
defined as in C.
* tp/t/init/redefine_need.init (my_need_formatting): also test
PACKAGE_CONFIG.
---
ChangeLog | 8 ++++++++
tp/t/init/redefine_need.init | 8 +++++---
tp/t/results/init_files_tests/redefined_need.pl | 2 +-
.../customization/res_parser/test_redefine_need/test_need.html | 4 ++--
tp/texi2any.pl | 3 +++
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9ccbbedcb2..1b3f9d1035 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-01-28 Patrice Dumas <pertusus@free.fr>
+
+ * tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same symbols
+ defined as in C.
+
+ * tp/t/init/redefine_need.init (my_need_formatting): also test
+ PACKAGE_CONFIG.
+
2024-01-28 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/Convert/Info.pm (format_node):
diff --git a/tp/t/init/redefine_need.init b/tp/t/init/redefine_need.init
index f2009cbe04..891d9f1722 100644
--- a/tp/t/init/redefine_need.init
+++ b/tp/t/init/redefine_need.init
@@ -11,8 +11,10 @@ sub my_need_formatting($$$)
my $cmdname = shift;
my $command = shift;
- my $package_version = Texinfo::Common::get_constant('PACKAGE');
- $package_version = '' if (!defined($package_version));
+ my $package = Texinfo::Common::get_constant('PACKAGE');
+ $package = '' if (!defined($package));
+ my $package_config = Texinfo::Common::get_constant('PACKAGE_CONFIG');
+ $package_config = '' if (!defined($package_config));
if ($command->{'extra'} and $command->{'extra'}->{'misc_args'}
and @{$command->{'extra'}->{'misc_args'}}) {
@@ -30,5 +32,5 @@ sub my_need_formatting($$$)
$arg_text = '';
}
return (&{$converter->formatting_function('format_comment')}($converter,
- "$cmdname: $arg_text ($package_version)"));
+ "$cmdname: $arg_text ($package|$package_config)"));
}
diff --git a/tp/t/results/init_files_tests/redefined_need.pl
b/tp/t/results/init_files_tests/redefined_need.pl
index 02c2898532..bc26db5228 100644
--- a/tp/t/results/init_files_tests/redefined_need.pl
+++ b/tp/t/results/init_files_tests/redefined_need.pl
@@ -79,7 +79,7 @@ $result_converted{'html'}->{'redefined_need'} = '<!DOCTYPE
html>
</head>
<body lang="en">
-<!-- need: 0.1 () -->
+<!-- need: 0.1 (|) -->
diff --git
a/tp/tests/customization/res_parser/test_redefine_need/test_need.html
b/tp/tests/customization/res_parser/test_redefine_need/test_need.html
index d5b8a963aa..6468156b08 100644
--- a/tp/tests/customization/res_parser/test_redefine_need/test_need.html
+++ b/tp/tests/customization/res_parser/test_redefine_need/test_need.html
@@ -28,8 +28,8 @@ span:hover a.copiable-link {visibility: visible}
<div class="top-level-extent" id="Top">
<h1 class="top" id="Test-need"><span>Test need<a class="copiable-link"
href="#Test-need"> ¶</a></span></h1>
-<p>@need </p><!-- need: 0.1 on line following (Texinfo) -->
-<p>@need </p><!-- need: 0.1 (Texinfo) -->
+<p>@need </p><!-- need: 0.1 on line following (Texinfo|Texinfo) -->
+<p>@need </p><!-- need: 0.1 (Texinfo|Texinfo) -->
</div>
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index ee1fbdad9b..f558094eb2 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -343,6 +343,9 @@ my $main_program_set_options = {
foreach my $configured_variable (keys(%$configured_information)) {
Texinfo::Common::set_constant($configured_variable,
$configured_information->{$configured_variable});
+ # set also with _CONFIG prepended, as in C code.
+ Texinfo::Common::set_constant($configured_variable.'_CONFIG',
+ $configured_information->{$configured_variable});
}
foreach my $configured_variable (keys(%$configured_information)) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/texi2any.pl: set also PACKAGE*_CONFIG to have the same symbols defined as in C.,
Patrice Dumas <=