Bjarni --

On Tue, Oct 21, 2025, Bjarni Ingi Gislason wrote:
>   The groff option "-ww" is not useful here as it reports a lot of
> undefined variables.
> 
>   Removing variables after use is contraproductive as nowadays there is
> abundant memory available.
> 
>   So instead of
> 
> rr <register>
> 
>   use
> 
> nr <register> 0
> 
> -.-
> 
>   For strings, instead of
> 
> rm <string>
> 
> use
> 
> ds <string>\"
> 
>   After such a cleanup, variables, that are still reported as undefined,
> should (could, may) be defined before the first warning is issued with
> 
> .nr <register> +0
> 
> .as <string>\"
> 
> as the variables could be defined on the command line.

Mom uses the expressions
  .if <reg>=n
  .if !<reg>=n
  .if '<name>'<string>'
  .if !'<name>'<string>'
extensively.  It is not an error, and, without getting into it,
there are reasons I prefer it to what you suggest.  Amongst other
things, what you call cleanup I call full-on renovation.

The way to remove the warnings when using -ww is to disable 'mac'
and 'reg' with -W (after -22). om.tmac used to include .warn 8192 to
silence them and a few others, but I removed it in favour of letting
users decide the warning level(s) themselves.

-- 
Peter Schaffter
https://www.schaffter.ca

Reply via email to