[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2970: soelim [in groff] is confused by .so in macros definitions

Package: groff
Version: 1.09-11

The soelim program whose job is to replace .so commands by the contents
of the source file incorrectly tries to replace .so lines in the body
of a macro definition (as a side effect, it fails).

Some manual pages do have some definitions like:

	.de dI
	.so \\$1


	.de pI
	.sy includePS "\\$1" "\\$2" "\\$3" "\\$4" > /tmp/pI.tmp.
	.so /tmp/pI.tmp.
	.sy rm -f /tmp/pI.tmp.

(you get the idea) where it is difficult to replace the .so commands.
(In the particular case of the manual pages I tested, these macros are
not even used, but soelim still does warn about not being able to replace
the .so commands).

I suggest that such uses do only produce warning messages iff the macro
they are defined in is ever used. This needs a change in the soelim
program to recognize the fact that the .so is used inside a macro
definition, and then to check if that particular definition is ever used.


P.S.: the soelim program is sometimes used `just in case' even if groff
would effectively correctly include the intended file at the right time.
Maybe adding a flag to soelim to ask it not to complain at all would be
nice for these cases?

Reply to: