URL:
<https://savannah.gnu.org/bugs/?64592>
Summary: Registers .m and .M contain no initial value
Group: GNU roff
Submitter: deri
Submitted: Thu 24 Aug 2023 09:35:37 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 24 Aug 2023 09:35:37 PM UTC By: Deri James <deri>
This code illustrates the issue:-
.ds curcol \n[.m]
.ds a \m[red]D\m[]eri
.ds b \m[blue]\*a James\m[]
\*b is black
.\" Fails - no colour stacking the 2nd \m[] does nothing
.br
.ds b \m[blue]\*a James\m[\*[curcol]]
\*b is black
.\" Fails - using stored colour from \n[.m] fails too - why (answer below)
.br
.gcolor black
.\" Answer - the value of \n[.m] is null before any colour is set
.\" even though we document the default colour is black.
.\" if .m is null \m[\*[curcol]] is equivalent to \m[] which we know
fails.
.ds curcol \n[.m]
.ds b \m[blue]\*a James\m[\*[curcol]]
\*b is black
.\" Now it works because \n[.m] has been populated
.sp
Should \n[.m] (and \n[.M]) be populated with the default colour (black)
initially.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64592>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/