Expand \n(.$ (the number of macro arguments) right in roff_userdef(),
authorschwarze <schwarze@openbsd.org>
Mon, 20 Aug 2018 17:31:44 +0000 (17:31 +0000)
committerschwarze <schwarze@openbsd.org>
Mon, 20 Aug 2018 17:31:44 +0000 (17:31 +0000)
commit0a06ee79129e40e391a1dda230cc93a638702655
tree704f6a43f1580148e38d8c6c389cfc8bf08d9c66
parent867d6e6a2f73ec1f0eeda072299c813575c5bb69
Expand \n(.$ (the number of macro arguments) right in roff_userdef(),
before even reparsing the expanded macro.
That is the least dirty way to fix the bug that \(.$ remained set
after execution of the user-defined macro ended.  Any other way
to fix it would probably require changes to read.c, which really
shouldn't be bothered with such roff(7) internals.
usr.bin/mandoc/roff.c