On Sun, 26 Dec 1999, Karl Heinz Marbaise wrote:
> first, thank you Eli for the good and fast explanation,
> but I get in trouble with this.
Sorry, I spake too fast and too harsh. It is true that the code which
handles @defXXX commits atrocities against the usual Texinfo syntax,
but most @-commands are unaffected by this. The ones which are
dangerous inside @defXXX are macro calls and @value. (I see your
source uses @value, so be warned; I hope that the patches below will
eliminate the need for that.)
The problem with @@ in this case is unique to the HTML mode, and it is
due to a bug: the HTML branch of the code doesn't expand the text, but
instead adds it to output verbatim.
The following changes should fix the problem. If they don't solve all
the problems, please tell which ones persist.
1999-12-26 Eli Zaretskii <[EMAIL PROTECTED]>
* makeinfo/defun.c (defun_internal): Use execute_string instead
add_word_args to expand defined_name, type_name and category (in
HTML mode).
--- makeinfo/defun.c~ Sun Jul 11 19:50:24 1999
+++ makeinfo/defun.c Sun Dec 26 21:55:42 1999
@@ -487,20 +487,30 @@ defun_internal (type, x_p)
case defvr:
case deftp:
/* <i> is for the following function arguments. */
- add_word_args ("<b>%s</b><i>", defined_name);
+ add_word ("<b>");
+ execute_string ("%s", defined_name);
+ add_word ("</b><i>");
break;
case deftypefn:
case deftypevr:
- add_word_args ("%s <b>%s</b><i>", type_name, defined_name);
+ execute_string ("%s ", type_name);
+ add_word ("<b>");
+ execute_string ("%s", defined_name);
+ add_word ("</b><i>");
break;
case defcv:
case defop:
- add_word_args ("<b>%s</b><i>", defined_name);
+ add_word ("<b>");
+ execute_string ("%s", defined_name);
+ add_word ("</b><i>");
break;
case deftypemethod:
case deftypeop:
case deftypeivar:
- add_word_args ("%s <b>%s</b><i>", type_name2, defined_name);
+ execute_string ("%s ", type_name2);
+ add_word ("<b>");
+ execute_string ("%s", defined_name);
+ add_word ("</b><i>");
break;
}
} /* if (html)... */
@@ -548,12 +558,13 @@ defun_internal (type, x_p)
case deftypevr:
add_word ("</i>"); /* close italic area for arguments */
/* put the rest into the second column */
- add_word_args ("</td>\n<td align=\"right\">%s", category);
+ add_word ("</td>\n<td align=\"right\">");
+ execute_string ("%s", category);
break;
case defcv:
add_word ("</td>\n<td align=\"right\">");
- add_word_args ("%s %s %s", category, _("of"), type_name);
+ execute_string ("%s %s %s", category, _("of"), type_name);
break;
case defop:
@@ -561,13 +572,13 @@ defun_internal (type, x_p)
case deftypeop:
add_word ("</i>");
add_word ("</td>\n<td align=\"right\">");
- add_word_args ("%s %s %s", category, _("on"), type_name);
+ execute_string ("%s %s %s", category, _("on"), type_name);
break;
case deftypeivar:
add_word ("</i>");
add_word ("</td>\n<td align=\"right\">");
- add_word_args ("%s %s %s", category, _("of"), type_name);
+ execute_string ("%s %s %s", category, _("of"), type_name);
break;
} /* switch (base_type)... */