[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Gavin D. Smith |
Date: |
Mon, 24 Oct 2022 10:03:36 -0400 (EDT) |
branch: master
commit 0b70bce5dff92e43f36c78084553b51c4c943f26
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Oct 24 15:01:51 2022 +0100
* doc/texinfo.texi (Conditional Nesting): Edit. Do not
vaguely describe the subject as "tricky". Ignore some
text.
---
ChangeLog | 6 ++++++
doc/texinfo.texi | 29 +++++++++++++++--------------
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b7e5193498..ec17b6d4fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-10-24 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * doc/texinfo.texi (Conditional Nesting): Edit. Do not
+ vaguely describe the subject as "tricky". Ignore some
+ text.
+
2022-10-24 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi (Reporting Bugs): Mention 'git diff'. Do
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 863cbf1fae..c922c2a6bc 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -13295,13 +13295,9 @@ general, to avoid unnecessary dependencies between
packages
@cindex Conditionals, nested
@cindex Nesting conditionals
-Conditionals can be nested; however, the details are a little tricky.
-The difficulty comes with failing conditionals, such as
-@code{@@ifhtml} when HTML is not being produced, where the included
-text is to be ignored. However, it is not to be @emph{completely}
-ignored, since it is useful to have one @code{@@ifset} inside another,
-for example---that is a way to include text only if two conditions are
-met. Here's an example:
+Texinfo requires that for a failing conditional, the
+ignored text must be properly nested with respect to that failing
+conditional. Here's an example:
@example
@@ifset somevar
@@ -13314,9 +13310,16 @@ Somevar is set, anothervar is not.
@@end ifset
@end example
-Technically, Texinfo requires that for a failing conditional, the
-ignored text must be properly nested with respect to that failing
-conditional. Unfortunately, it's not always feasible to check that
+If @samp{somevar} is not set, the whole block is skipped.
+
+To allow the processors to reliably determine which commands to consider
+for nesting purposes, all conditional commands must be on lines
+by themselves, with no text (even spaces) before or after.
+
+
+@ignore not sure what this is about
+
+Unfortunately, it's not always feasible to check that
@emph{all} conditionals are properly nested, because then the
processors could have to fully interpret the ignored text, which
defeats the purpose of the command. Here's an example illustrating
@@ -13331,10 +13334,8 @@ these rules:
@@c WRONG - missing @@end ifset.
@end example
-Finally, as mentioned above, all conditional commands must be on lines
-by themselves, with no text (even spaces) before or after. Otherwise,
-the processors cannot reliably determine which commands to consider
-for nesting purposes.
+@end ignore
+
@node Defining New Texinfo Commands