问题
Is there a good way to uniformly indent a block of text in an m4 macro? In other words, the macro
define(`mytext',dnl
This is
a
piece of text
that I would like
to indent)
mytext
generates
This is
a
piece of text
that I would like
to indent
I'd like to have a way to indent the whole block of text to a specified amount.
回答1:
How about patsubst:
patsubst(mytext,`^', ` ')
来源:https://stackoverflow.com/questions/29026753/how-to-indent-a-block-of-text-in-an-m4-macro