bug-texinfo
[Top][All Lists]
Advanced

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

Re: leading and trailing spaces in brace commands


From: Patrice Dumas
Subject: Re: leading and trailing spaces in brace commands
Date: Wed, 28 Sep 2022 21:35:21 +0200

On Tue, Sep 27, 2022 at 08:10:57PM +0100, Gavin Smith wrote:
> On Tue, Sep 27, 2022 at 09:26:15AM +0200, Patrice Dumas wrote:
> > > I'm not sure if it would be correct to ignore spaces for other commands:
> > > @math, @value, @verb...  Almost every command could be different.  It
> > > seems quite simple to say that these spaces are ignored for 
> > > BRACE_arguments
> > > commands but not for others, although needless to say I haven't fully
> > > explored the consequences of this idea by trying to implement it.
> > 
> > That's exactly what the implementation does currently, but my point is
> > that some of these cocmmands should not be in BRACE_arguments but in
> > another class, either one already existing, or a new one.
> 
> OK, some commands could move to BRACE_arguments if we want to ignore spaces
> in their arguments.

I do not have example of such cases, actually. 

> @math isn't currently in BRACE_arguments and as spaces don't need to be
> ignored for @math (I haven't checked whether they are or not), it's fine
> to leave it out.

And it is best if it remains in BRACE_context too, the code may be
changed, but for now it is expected there and I think that it makes
sense.

> I see you have made some changes to the command types.  @value and @verb are
> now BRACE_other (along with @w).  I guess @value is special because it
> is expanded immediately, and @verb and @w also are handled uniquely.

@value is also special because it should contain flags names only.

> I looked through command_data.txt and your list of commands
> where spaces around arguments can be kept - @dmn, @key, @indicateurl,
> @titlefont - appears sensible to me.  I don't know how easy it would be
> to change any of these.  Would you be moving them to BRACE_style_other?

I think that @indicateurl should go to BRACE_style_other, @key could
too, even if it is less clear.  I would propose to add another category
for @titlefont and @dmn for brace commands that are not style commands,
do not have spaces ignored and are not special enough to be explicitly
in BRACE_other.  Maybe BRACE_misc.

-- 
Pat



reply via email to

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