gbranden pushed a commit to branch master
in repository groff.
commit ceac6ee0c28773e4f93e0c6756d04240692fbc8d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Nov 8 11:28:16 2025 -0600
Reform terminology.
"conditional operator" -> "conditional expression operator"
* src/roff/troff/input.cpp (is_conditional_expression_true): Update
wording in diagnostic message.
* doc/groff.texi.in (Selecting Fonts, Diversions):
* man/groff.7.man (Diversions): Update documentation.
---
ChangeLog | 27 +++++++++++++++++++--------
contrib/mm/ChangeLog | 3 ++-
doc/groff.texi.in | 14 +++++++++-----
doc/webpage.ms | 5 +++--
man/groff.7.man | 7 ++++---
src/roff/troff/input.cpp | 5 +++--
6 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bbdb00784..edf2cef51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-11-08 G. Branden Robinson <[email protected]>
+
+ Reform terminology: "conditional operator" -> "conditional
+ expression operator".
+
+ * src/roff/troff/input.cpp (is_conditional_expression_true):
+ Update wording in diagnostic message.
+
+ * doc/groff.texi.in (Selecting Fonts, Diversions):
+ * man/groff.7.man (Diversions): Update documentation.
+
2025-11-12 G. Branden Robinson <[email protected]>
* src/preproc/pic/pic.ypp (ordinal): Replace C-style type cast
@@ -406,10 +417,10 @@
anyway, but warns of its ambiguity.}
(is_conditional_expression_true): Refactor, introducing new
Boolean local variable `perform_output_comparison`. Throw
- syntax warning if `v` conditional operator used in compatibility
- mode, as no variant of AT&T troff available to me recognizes it.
- Distinguish compatibility mode once the letteral conditional
- expression operators are ruled out.
+ syntax warning if `v` expression conditional operator used in
+ compatibility mode, as no variant of AT&T troff available to me
+ recognizes it. Distinguish compatibility mode once the letteral
+ conditional expression operators are ruled out.
Fixes <https://savannah.gnu.org/bugs/?67408>.
@@ -19206,10 +19217,10 @@
condition was consistently misspelled, testing for the existence
of, for example, a register named "ef*spec!J:\\$1" (where `\\$1`
_would_ be interpolated, but not improve chances of success).
- Fix by using the `d` conditional operator as obviously intended.
- This enables some refer(1) formatting customization that was
- unfortunately inoperative. Problem appears to date back to
- commit 3bab8e6fe5, 2011-01-28.
+ Fix by using the `d` conditional expression operator as
+ obviously intended. This enables some refer(1) formatting
+ customization that was unfortunately inoperative. Problem
+ appears to date back to commit 3bab8e6fe5, 2011-01-28.
Fixes <https://savannah.gnu.org/bugs/?64779>. Thanks to an
anonymous bug submitter for the report and the patch.
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index c32c997fa..67c1860a9 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -2010,7 +2010,8 @@
2021-07-17 G. Branden Robinson <[email protected]>
* mm/ms.cov (COVEND): Fix thinko; test for existence of
- `cov*abs-arg` register with `r` conditional operator, not `d`.
+ `cov*abs-arg` register with `r` conditional expression operator,
+ not `d`.
2021-07-17 G. Branden Robinson <[email protected]>
diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index 6f3ac0545..b52804b66 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -11345,7 +11345,9 @@ We can assign a font to a margin character as follows
@cindex @code{ie} request, and font translations
@cindex @code{while} request, and font translations
Translate font name@tie{}@var{f} to@tie{}@var{g}. Where the @code{\f}
-escape sequence, the @code{F} and @code{S} conditional operators, and
+escape sequence,
+the @code{F} and @code{S} conditional expression operators,
+and
the @code{ft}, @code{ul}, @code{bd}, @code{cs}, @code{tkf},
@code{special}, @code{fspecial}, @code{fp}, or @code{sty} requests refer
to@tie{}@var{f}, GNU @command{troff} uses @var{g} instead. Omit @var{g}
@@ -16879,10 +16881,12 @@ top-level diversion has no name.
Dereferencing an undefined diversion creates an empty one of that
name and emits a warning in category @samp{mac}.
@xref{Warnings}, regarding the enablement and suppression of warnings.
-A diversion does not exist for the purpose of testing with the @code{d}
-conditional operator until its initial definition ends (@pxref{Operators
-in Conditionals}). The following requests are used to create and alter
-diversions.
+A diversion does not exist for the purpose of testing with the
+@code{d}
+conditional expression operator
+until its initial definition ends
+(@pxref{Operators in Conditionals}).
+The following requests are used to create and alter diversions.
@DefreqList {di, [@Var{name}]}
@DefreqListEndx {da, [@Var{name}]}
diff --git a/doc/webpage.ms b/doc/webpage.ms
index 7384f6723..2de9e6618 100644
--- a/doc/webpage.ms
+++ b/doc/webpage.ms
@@ -972,7 +972,8 @@ A new read-only, string-valued register `.sty' returns the
name of the
current style.
.LI
-Two new conditional operators `F\~\[la]name\[ra]' and `S\~\[la]name\[ra]'
+Two new conditional expression operators
+`F\~\[la]name\[ra]' and `S\~\[la]name\[ra]'
have been added.
`F' is true if a font \[la]name\[ra] exists.
`S' is true if a style \[la]name\[ra] has been registered.
@@ -1968,7 +1969,7 @@ environment variable also.
For defining color components as fractions between 0 and\~1, a new
scaling unit `f' has been defined: 1f\~=\~65536u.
For testing whether a color is defined (with \&.if and \&.ie), a new
-conditional operator `m' is available.
+conditional expression operator `m' is available.
More details can be found in the groff_diff.7 manual page and in
groff.texinfo.
diff --git a/man/groff.7.man b/man/groff.7.man
index 1bcec358b..8141d53ab 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -8489,7 +8489,7 @@ regarding the enablement and suppression of warnings.
.
A diversion does not exist for the purpose of testing with the
.B d
-conditional operator until its initial definition ends
+conditional expression operator until its initial definition ends
(see subsection \[lq]Conditional expressions\[rq] above).
.\" The following requests are used to create and alter diversions.
.
@@ -8594,8 +8594,9 @@ and
.RB \%\[lq] unformat \[rq]
requests reprocess diversions.
.\" XXX: That's a weak statement. What we need is a `for` request and
-.\" a new conditional operator that tests whether an item in a node list
-.\" is an (otherwise unrepresentable) node. See Savannah #62264.
+.\" a new conditional expression operator that tests whether an item in
+.\" a node list is an (otherwise unrepresentable) node. See Savannah
+.\" #62264.
.\" END Keep (roughly) parallel with groff.texi node "Diversions".
.
.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 8eac2268a..9a9ba8355 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6915,7 +6915,8 @@ static bool is_conditional_expression_true()
case 'r':
case 'v':
warning(WARN_SYNTAX,
- "conditional operator '%1' used in compatibility mode",
+ "conditional expression operator '%1' used in"
+ " compatibility mode",
c);
// TODO: "; treating as output comparison delimiter", c);
break;
@@ -6939,7 +6940,7 @@ static bool is_conditional_expression_true()
tok.next();
}
// TODO: else if (!want_att_compat) {
- // Check for GNU troff extension conditional operators.
+ // Check for GNU troff extended conditional expression operators.
else if ((c == 'd') || (c == 'r')) {
tok.next();
symbol nm = get_name(true /* required */);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit