Follow-up Comment #15, bug #66392 (group groff): At 2025-02-01T11:29:08-0500, Dave wrote: > Follow-up Comment #14, bug #66392 (group groff): > [comment #13 comment #13:] >> meeting your expectations would make `.hla` the only predefined >> register, I think, that would automatically come and go from >> existence as one changed environments. > > I did consider (but didn't write down, so you'd have no way of knowing > that) that this might make \n[.hla] an outlier among predefined > registers. And I could see that being enough of a design wart to want > to avoid it. However... > >> What other predefined registers do you perform existence checks >> on, and under what circumstances? > > True, the situation's never come up before. But .hla is sort of an outlier > in > this regard anyway: any other predefined register I can think of always has a > meaningful value.
Until this (1.24) development cycle, `.m` and `.M` didn't, necessarily.
Now they always interpolate _something_.
> For most (maybe all) of them, a value of 0 doesn't correspond to
> "undefined," but to "off" or an actual measurement of 0. Are there
> any other predefined registers that track a thing that simply might
> not be set at all?
It wouldn't--he said without looking at the code--be hard to make `.hla`
interpolate "undefined". It's populated with a data type called
`symbol` and we have "default symbols" in other applications in the
formatter.
src/libs/libgroff/symbol.cpp:symbol default_symbol("default");
That won't rescue your `.if r .hla` idiom, but there might be a better
chance of its meaning being thunderingly obvious to the user.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66392>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
