Re: Generalising @def*

Gavin Smith <[email protected]>
Newsgroups gmane.comp.tex.texinfo.general
Message-ID <Y+f3kb6o0htkRunB@starmint>
On Sat, Feb 11, 2023 at 08:11:22PM +0100, Patrice Dumas wrote:
> On Sat, Feb 11, 2023 at 11:59:07AM +0000, Gavin Smith wrote:
> > 
> > I've commited changes to texinfo.tex to introduce @defblock, @deflinex
> > and @deftypelinex.  @deflinex is like @deffnx and @deftypelinex is like
> > @deftypefnx.  The names of these could change, for example to remove the 'x'
> > at the end of the commands, if we decide this would be better.
> > 
> > I believe this covers usage for @defvr, @deftypevr, @deftp.
> > 
> > I have gone off the idea of using @macro for this.  I am thinking a
> > more limited command would be better, as mentioned in an earlier message
> > 
> >   @newdef defbuiltin = typed, tt, Built-in Function, fn
> > 
> > or similar.  This would cover the basics and be easy to use and understand.
> > The example here would translate a @defbuiltin line to a @deftypelinex line
> > within a @defblock.
> 
> I do not like that, as this adds commands that are not in the language
> and it is always a pain.  I liked the generic command + separate index
> entries, that could be grouped with @macro better.

OK, I know that dynamically updating command lists or handling
command macro expansion can add a lot of complexity to texi2any.
The next step now is probably to add @defblock to texi2any.

I still don't think that

@defMac{macro1, (arg1@comma{} arg2)}

is a very good syntax, though.  Maybe we could come back to this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.