[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @macro expansion bug
From: |
Eli Zaretskii |
Subject: |
Re: @macro expansion bug |
Date: |
Thu, 22 Mar 2001 10:00:00 +0200 (IST) |
On Wed, 21 Mar 2001, Werner LEMBERG wrote:
> The problem is not texi2dvi, but `makeinfo -E': It doesn't expand a
> user-defined macro in @deffn.
This is a known problem, and it is unlikely to be fixed without either
a complete rewrite of makeinfo or an incompatible change in the syntax of
@deffn and friends. The following comment (from the function
defun_internal in the defun.c file from Texinfo sources) explains why:
/* The @def.. line is the only place in Texinfo where you are
allowed to use unquoted braces that don't delimit arguments of
a command or a macro; in any other place it will trigger an
error message from the reader loop. The special handling of
this case inside `args_from_string' is an extra special hack
which allows this. The side effect is that if we try to expand
the rest of the line below, the recursive reader loop will
signal an error if there are brace-delimited arguments on that line.
The best solution to this would be to change the syntax of
@def.. commands so that it doesn't violate Texinfo's own rules.
But it's probably too late for this now, as it will break a lot
of existing manuals.
Unfortunately, this means that you can't call macros, use @value, etc.
inside @def.. commands, sigh. */
get_rest_of_line (0, &line);
The zero as the first argument in the call to get_rest_of_line is the
reason why macros (and other @-commands) are not expanded inside @deffn
directives.
Re: @macro expansion bug, Akim Demaille, 2001/03/23