bug-texinfo
[Top][All Lists]
Advanced

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

Re: starting body w macro use outputs bad HTML


From: Karl Berry
Subject: Re: starting body w macro use outputs bad HTML
Date: Thu, 31 Oct 2002 15:35:56 -0500

    \input texinfo
    @setfilename macro-first.info
    @settitle Macro First Bug
    @macro first
    This macro is called first!
    @end macro
    @first{}
    This document shows a macro expansion being output before the HTML header.
    It happens when the macro use is the first thing in the body.
    @bye

Here is an ugly patch.  Let me know ...

*** makeinfo.c  26 Oct 2002 23:12:28 -0000      1.6
--- makeinfo.c  31 Oct 2002 17:13:13 -0000
***************
*** 1825,1830 ****
--- 1825,1837 ----
          if (!(def->flags & ME_RECURSE))
            def->inhibited = 1;
  
+         /* If we're expanding a macro, we better get the HTML output
+            started, in case the macro produces something.  The normal
+            condition in add_char doesn't apply because macro expansion
+            sets executing_string.  */
+         if (html && !html_output_head_p)
+           html_output_head ();        
+ 
          execute_macro (def);
  
          if (!(def->flags & ME_RECURSE))




reply via email to

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