[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 18/18: [troff]: Fix Savannah #64592 (default color name).
From: |
G. Branden Robinson |
Subject: |
[groff] 18/18: [troff]: Fix Savannah #64592 (default color name). |
Date: |
Fri, 5 Jan 2024 22:25:20 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 6ed670b656cbdb57c494bc8cd559f9bfcd26ad9e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jan 5 19:59:13 2024 -0600
[troff]: Fix Savannah #64592 (default color name).
* src/libs/libgroff/color.cpp: Explicitly name the default color
"default", instead of permitting it to have a null name.
* doc/groff.texi (Colors):
* man/groff.7.man (Read-only regsiters):
* NEWS: Document it.
Fixes <https://savannah.gnu.org/bugs/?64592>. Thanks to Deri James,
Dave Kemper, and Peter Schaffter for the discussion.
---
ChangeLog | 14 ++++++++++++++
NEWS | 4 ++++
doc/groff.texi | 9 ++++-----
man/groff.7.man | 6 ++++--
src/libs/libgroff/color.cpp | 2 +-
5 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 48184e93d..7c6c9ecc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-01-05 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff]: Fix Savannah #64592 (default color name).
+
+ * src/libs/libgroff/color.cpp: Explicitly name the default color
+ "default", instead of permitting it to have a null name.
+
+ * doc/groff.texi (Colors):
+ * man/groff.7.man (Read-only regsiters):
+ * NEWS: Document it.
+
+ Fixes <https://savannah.gnu.org/bugs/?64592>. Thanks to Deri
+ James, Dave Kemper, and Peter Schaffter for the discussion.
+
2024-01-05 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Implement new `pcolor` request.
diff --git a/NEWS b/NEWS
index 2f219aa7f..82a0433fa 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,10 @@ o A new request, `phw`, reports to the standard error stream
the current
o The `hla` request, when invoked with no arguments, now clears the
hyphenation language, disabling automatic hyphenation.
+o The read-only registers `.m` and `.M` now interpolate "default" when
+ the default color is selected as the stroke or fill color,
+ respectively, rather than interpolating nothing.
+
eqn
---
diff --git a/doc/groff.texi b/doc/groff.texi
index a956f1a6b..f479f47c7 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -12377,8 +12377,8 @@ does a @code{gcolor} request without an argument.
@cindex color name, stroke, register (@code{.m})
The name of the current stroke color is available in the read-only
string-valued register @samp{.m}; it is associated with the environment
-(@pxref{Environments}). It interpolates nothing when the stroke color
-is the default.
+(@pxref{Environments}). The default stroke color is named
+@samp{default}.
@code{\m} doesn't produce an input token in GNU @code{troff}
(@pxref{Gtroff Internals}). It therefore can be used in requests like
@@ -12407,9 +12407,8 @@ color, as does an @code{fcolor} request without an
argument.
@cindex color name, fill, register (@code{.M})
The name of the current fill color is available in the read-only
string-valued register @samp{.M}; it is associated with the environment
-(@pxref{Environments}). It interpolates nothing when the fill color
-is the default. @code{\M} doesn't produce an input token in GNU
-@code{troff}.
+(@pxref{Environments}). The default fill color is named @samp{default}.
+@code{\M} doesn't produce an input token in GNU @code{troff}.
Create an ellipse with a red interior as follows.
diff --git a/man/groff.7.man b/man/groff.7.man
index 79d10884e..6357f38ad 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -6179,7 +6179,8 @@ see
and
.esc m .
.
-Empty if the stroke color is the default.
+The default stroke color is named
+.RB \[lq] default \[rq].
.
.TP
.REG .M
@@ -6189,7 +6190,8 @@ see
and
.esc M .
.
-Empty if the fill color is the default.
+The default fill color is named
+.RB \[lq] default \[rq].
.
.TP
.REG .n
diff --git a/src/libs/libgroff/color.cpp b/src/libs/libgroff/color.cpp
index cc4498f44..426b2bca9 100644
--- a/src/libs/libgroff/color.cpp
+++ b/src/libs/libgroff/color.cpp
@@ -399,7 +399,7 @@ char *color::print_color()
return s;
}
-color default_color("");
+color default_color("default");
// Local Variables:
// fill-column: 72
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 18/18: [troff]: Fix Savannah #64592 (default color name).,
G. Branden Robinson <=