bug-texinfo
[Top][All Lists]
Advanced

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

Re: Whitespace and Macros and Bugs


From: Eli Zaretskii
Subject: Re: Whitespace and Macros and Bugs
Date: Wed, 20 Oct 2010 22:34:14 +0200

> Date: Wed, 20 Oct 2010 13:18:21 -0700 (PDT)
> From: Michael Witten <address@hidden>
> 
> Is there a particular reason why the address@hidden' line yields a
> blank line?

Because of the way makeinfo works internally: it never (or almost
never) swallows newlines.  Doing so would make its code much more
complicated.

> The macros have introduced whitespace, namely a blank line
> between `A' and `B' and a blank line between `B' and `C'.
> 
> Is this not a bug?

Not really a bug, just a side effect of a feature you didn't consider:
a macro can be invoked in the middle of text, not just alone on its
line.

> Is it not at least inconsistent behavior?

No, because the use of @macro was never advertised to be transparent.

> According to:
> 
>   info texinfo 'Defining Macros'
> 
> we have:
> 
>   You use the Texinfo address@hidden' command to define a macro, like this:
>   
>        @macro MACRONAME{PARAM1, PARAM2, ...}
>        TEXT ... \PARAM1\ ...
>        @end macro
>   
>   ...
>   
>     The newlines after the address@hidden' line and before the address@hidden 
> macro' line
>   are ignored, that is, not included in the macro body.  All other
>   whitespace is treated according to the usual Texinfo rules.
> 
> This suggests that it is a bug.

No, at least not according to this text.  It says that the newline is
not part of the _body_, not of the _expansion_.

Macros in Texinfo are messy, they produce unexpected results (due to
the way they were implemented), and they are not expected to be used
to expand into Texinfo commands that themselves expand to nothing.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]