[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: add CHECK_MISSING_MENU_ENTRY
From: |
Gavin D. Smith |
Subject: |
branch master updated: add CHECK_MISSING_MENU_ENTRY |
Date: |
Fri, 04 Aug 2023 19:45:58 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 37d6e527f3 add CHECK_MISSING_MENU_ENTRY
37d6e527f3 is described below
commit 37d6e527f3b002e5b293f65efe552bfc0cfe0e1c
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Aug 5 00:45:49 2023 +0100
add CHECK_MISSING_MENU_ENTRY
* tp/Texinfo/Common.pm (%default_main_program_customization):
Add CHECK_MISSING_MENU_ENTRY, true by default.
* tp/Texinfo/Structuring.pm (complete_node_tree_with_menus):
Do not output warnings about missing menu entries if
CHECK_MISSING_MENU_ENTRY is not set. This was formerly controlled
by CHECK_NORMAL_MENU_STRUCTURE but was latterly on unconditionally.
* doc/texinfo.texi (Other Customization Variables): Document.
* tp/t/test_utils.pl: Set 'CHECK_NORMAL_MENU_STRUCTURE' in
configuration.
* NEWS: update
---
ChangeLog | 15 +++++++++++++++
NEWS | 2 +-
doc/texinfo.texi | 11 +++++++++--
tp/Texinfo/Common.pm | 1 +
tp/Texinfo/Structuring.pm | 3 ++-
tp/t/test_utils.pl | 6 ++++--
6 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a967e4367b..4485c0fe42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2023-08-05 Gavin Smith <gavinsmith0123@gmail.com>
+
+ add CHECK_MISSING_MENU_ENTRY
+
+ * tp/Texinfo/Common.pm (%default_main_program_customization):
+ Add CHECK_MISSING_MENU_ENTRY, true by default.
+ * tp/Texinfo/Structuring.pm (complete_node_tree_with_menus):
+ Do not output warnings about missing menu entries if
+ CHECK_MISSING_MENU_ENTRY is not set. This was formerly controlled
+ by CHECK_NORMAL_MENU_STRUCTURE but was latterly on unconditionally.
+ * doc/texinfo.texi (Other Customization Variables): Document.
+ * tp/t/test_utils.pl: Set 'CHECK_NORMAL_MENU_STRUCTURE' in
+ configuration.
+ * NEWS: update
+
2023-08-04 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi (Top): Remove @menu and @detailmenu, using
diff --git a/NEWS b/NEWS
index 7a711cf76a..1cec23cf04 100644
--- a/NEWS
+++ b/NEWS
@@ -22,7 +22,7 @@ See the manual for detailed information.
. @itemx at the beginning of a @table is now an error, not a warning
. better validity checking of deeply nested commands
. warn about missing menu entries even if CHECK_NORMAL_MENU_STRUCTURE is
- not set
+ not set. you can turn this off by setting CHECK_MISSING_MENU_ENTRY to 0.
. @set and @clear should only appear at the start of a line
. --enable-encoding and --disable-encoding no longer determine whether
encoded characters are output instead of entities or commands for
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 4dbe171e5b..5633587bcb 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -16132,9 +16132,16 @@ Indentation for @code{@@nodedescription} or
@code{@@nodedescriptionblock}
menu entry description formatting in Info. Undefined by default, in which case
44% of the fill column value is used (@pxref{Invoking @command{texi2any}}).
+@item CHECK_MISSING_MENU_ENTRY
+When a @code{@@menu} block occurs in a node, check if there is a menu
+entry for all subordinate nodes in the document sectioning structure. On
+by default.
+
@item CHECK_NORMAL_MENU_STRUCTURE
-Warn if the nodes pointers (either explicitly or automatically set)
-are not consistent with the order of node menu entries.
+Warn if the node pointers (either explicitly or automatically set)
+are not consistent with the order of node menu entries. This is a more
+thorough structure check than that provided by
+@code{CHECK_MISSING_MENU_ENTRY}. Off by default.
@item CLOSE_QUOTE_SYMBOL
When a closing quote is needed, use this character; default @code{’}
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index d74833c52b..62934b5c44 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -292,6 +292,7 @@ our %default_main_program_customization = (
# automatic direction and directions in menu are not consistent
# with sectionning, and when node directions are not consistent
# with menu directions.
+ 'CHECK_MISSING_MENU_ENTRY' => 1,
'DUMP_TREE' => undef,
'DUMP_TEXI' => undef,
'SHOW_BUILTIN_CSS_RULES' => 0,
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 950ce976d7..352ba177a6 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -752,7 +752,8 @@ sub complete_node_tree_with_menus($$$$)
}
# check for node up / menu up mismatch
- if ($node->{'structure'}->{'node_up'}
+ if ($customization_information->get_conf('CHECK_MISSING_MENU_ENTRY')
+ and $node->{'structure'}->{'node_up'}
# No check if node up is an external manual
and (!$node->{'structure'}->{'node_up'}->{'extra'}->{'manual_content'})
and (!$node->{'structure'}->{'menu_up_hash'}
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 2dfffb62a1..fe1ff0efdb 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -901,8 +901,10 @@ sub test($$)
delete $parser_options->{'TREE_TRANSFORMATIONS'};
}
- # set FORMAT_MENU default to menu, which is the default for parser
- my $added_main_configurations = {'FORMAT_MENU' => 'menu'};
+ # set FORMAT_MENU default to menu, which is the default for the parser.
+ # get the same structuring warnings as texi2any.
+ my $added_main_configurations = {'FORMAT_MENU' => 'menu',
+ 'CHECK_MISSING_MENU_ENTRY' => 1};
# this is only used for index keys sorting in structuring
foreach my $structuring_and_converter_option ('ENABLE_ENCODING') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: add CHECK_MISSING_MENU_ENTRY,
Gavin D. Smith <=