bug-texinfo
[Top][All Lists]
Advanced

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

Re: In an @example, @comment at EOL swallows the following newline.


From: Eli Zaretskii
Subject: Re: In an @example, @comment at EOL swallows the following newline.
Date: Tue, 02 Jan 2018 18:00:53 +0200

> From: Gavin Smith <address@hidden>
> Date: Mon, 1 Jan 2018 23:02:53 +0000
> 
> On Mon, Jan 01, 2018 at 10:23:23PM +0000, Gavin Smith wrote:
> > There could be a case for changing makeinfo to be consistent with 
> > texinfo.tex, provided we can work out what texinfo.tex is doing.
> > 
> 
> So I believe in texinfo.tex, it's impossible for a @c within a macro 
> definition to comment out something that follows an invocation of the 
> macro. In the examples discussed here, that is the linefeed character at 
> the end of the line. (The @c in the macro body does remove a linefeed 
> character, but that is the linefeed character in the macro body itself.)

Texinfo macros were always incompatible with texinfo.tex, which was
why Karl disliked them so much.  If a macro is needed that should also
produce something in the printed version, you generally need 2
versions of the macro.  AFAIU (and Karl can correct me if I'm wrong),
there's no way around that, never was.  This problem is one reason why
we have the -E switch to makeinfo.

So trying to reconcile them would IMO be a futile waste of effort, one
which most probably will break some "creative" uses of macros out
there, and otherwise gain us nothing tangible, because of that basic
incompatibility.

> This needs a lot of testing before it's done.  I believe I tried a similar
> change before but it led to a few changes in the results in makeinfo's 
> test suite, which I didn't investigate fully.

My advice would be to leave this alone.  Macros are tricky, and will
always be, unless we completely replace them with some other facility
designed from the ground up.



reply via email to

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