[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * NEWS: document that L2H was removed.
From: |
Patrice Dumas |
Subject: |
branch master updated: * NEWS: document that L2H was removed. |
Date: |
Thu, 02 Sep 2021 05:47:26 -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 1283ed5 * NEWS: document that L2H was removed.
1283ed5 is described below
commit 1283ed539483f1aad64382150d4514db56aca624
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Sep 2 11:47:14 2021 +0200
* NEWS: document that L2H was removed.
* tp/Texinfo/Config.pm (_GNUT_map_obsolete_options),
(texinfo_set_from_init_file, GNUT_set_from_cmdline):
add _GNUT_map_obsolete_options to map obsolete options
to current options.
add _GNUT in front of internal functions starting with _.
---
ChangeLog | 10 ++++++++++
NEWS | 4 ++++
tp/Texinfo/Config.pm | 44 ++++++++++++++++++++++++++++++++++++++++----
3 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c8a6b6e..b45129f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2021-09-02 Patrice Dumas <pertusus@free.fr>
+ * NEWS: document that L2H was removed.
+
+ * tp/Texinfo/Config.pm (_GNUT_map_obsolete_options),
+ (texinfo_set_from_init_file, GNUT_set_from_cmdline):
+ add _GNUT_map_obsolete_options to map obsolete options
+ to current options.
+ add _GNUT in front of internal functions starting with _.
+
+2021-09-02 Patrice Dumas <pertusus@free.fr>
+
* tp/Texinfo/XS/parsetexi/Parsetexi.pm (_get_error_registrar)
(parse_texi_file, _get_errors): setup an error registrar
to output the error message obtained before tree parsing.
diff --git a/NEWS b/NEWS
index 7282c1f..639abd6 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,10 @@ See the manual for detailed information.
------------------------------------------------------------------------------
+6.X
+* texi2any
+ . L2H customization variable removed. Replaced by HTML_MATH set to l2h.
+
6.8 (3 July 2021)
* Language
. new command @displaymath for formatting of mathematical notation
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 7be921a..d9ebf73 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -22,6 +22,7 @@
# files codes are prefixed by texinfo_.
#
# TODO document all texinfo_ in a pod section, but wait for stabilization
+# document that GNUT_, _GNUT_ and texinfo_ are reserved prefixes.
package Texinfo::Config;
@@ -49,7 +50,7 @@ sub GNUT_initialize_config($$$) {
}
# duplicated from texi2any.pl
-sub _document_warn($) {
+sub _GNUT_document_warn($) {
return if (texinfo_get_conf('NO_WARN'));
my $text = shift;
chomp ($text);
@@ -64,19 +65,48 @@ sub GNUT_load_init_file($) {
eval { require($file) ;};
my $e = $@;
if ($e ne '') {
- _document_warn(sprintf(__("error loading %s: %s\n"),
+ _GNUT_document_warn(sprintf(__("error loading %s: %s\n"),
$file, $e));
}
}
+# L2H removed in 2021
+# return undef for var there is nothing to set.
+sub _GNUT_map_obsolete_options($$)
+{
+ my $input_var = shift;
+ my $input_value = shift;
+
+ my $var = $input_var;
+ my $value = $input_value;
+
+ if ($input_var eq 'L2H') {
+ _GNUT_document_warn(sprintf(__("obsolete option: %s"), $input_var));
+ if (! $input_value) {
+ # nothing to do in that case
+ $var = undef;
+ $value = undef;
+ } else {
+ $var = 'HTML_MATH';
+ $value = 'l2h';
+ }
+ }
+ return $var, $value;
+}
+
# Called from init files to set configuration options.
sub texinfo_set_from_init_file($$) {
my $var = shift;
my $value = shift;
+
+ ($var, $value) = _GNUT_map_obsolete_options($var, $value);
+ if (!defined($var)) {
+ return 1;
+ }
if (!Texinfo::Common::valid_option($var)) {
# carp may be better, but infortunately, it points to the routine that
# loads the file, and not to the init file.
- _document_warn(sprintf(__("%s: unknown variable %s"),
+ _GNUT_document_warn(sprintf(__("%s: unknown variable %s"),
'texinfo_set_from_init_file', $var));
return 0;
}
@@ -90,10 +120,16 @@ sub texinfo_set_from_init_file($$) {
sub GNUT_set_from_cmdline($$) {
my $var = shift;
my $value = shift;
+
+ ($var, $value) = _GNUT_map_obsolete_options($var, $value);
+ if (!defined($var)) {
+ return 1;
+ }
+
delete $init_files_options->{$var};
delete $default_options->{$var};
if (!Texinfo::Common::valid_option($var)) {
- _document_warn(sprintf(__("%s: unknown variable %s\n"),
+ _GNUT_document_warn(sprintf(__("%s: unknown variable %s\n"),
'GNUT_set_from_cmdline', $var));
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * NEWS: document that L2H was removed.,
Patrice Dumas <=