bug-texinfo
[Top][All Lists]
Advanced

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

Re: makeinfo 4.5.91: garbage before <html>


From: Karl Berry
Subject: Re: makeinfo 4.5.91: garbage before <html>
Date: Sat, 17 May 2003 17:26:11 -0400

    I installed texinfo 4.5.91 over my old 4.5 version (maybe a bad
    idea?)

Ordinarily it's not a good idea to overwrite released versions with
pretests, but in this case 4.5.91 is so close to 4.6 that it's
plausible.

     lacks the <html> tag.  ...  The reason is the @tbook{} macro call
     in the @copying section.  If I delete it, everything works fine.

I think this bug was introduced in 4.3, actually (in the process of
fixing another bug, where macro calls beginning a document didn't output
the html head).

Anyway, here's a patch, although I'm not proud of it.

Thanks for the report.  By the way, in the future, it's better to report
bugs about pretest versions to address@hidden, and save
bug-texinfo for discussion of real releases.

k


*** makeinfo.c.~1.31.~  Tue May 13 09:37:54 2003
--- makeinfo.c  Sat May 17 14:04:29 2003
***************
*** 2327,2332 ****
--- 2327,2353 ----
    in_html_elt--;
  }
  
+ /* Here is another awful kludge, used in add_char.  Ordinarily, macro
+    expansions take place in the body of the document, and therefore we
+    should html_output_head when we see one.  But there's an exception: a
+    macro call might take place within @copying, and that does not start
+    the real output, even though we fully expand the copying text.
+
+    So we need to be able to check if we are defining the @copying text.
+    We do this by looking back through the insertion stack.  */
+ static int
+ defining_copying ()
+ {
+   INSERTION_ELT *i;
+   for (i = insertion_stack; i; i = i->next)
+     {
+       if (i->insertion == copying)
+         return 1;
+     }
+   return 0;
+ }
+
+
  /* Add the character to the current paragraph.  If filling_enabled is
     nonzero, then do filling as well. */
  void
***************
*** 2443,2447 ****
             any order and with any omissions, and we'll still output
             the html <head> `just in time'.  */
          if ((executing_macro || !executing_string)
!             && html && !html_output_head_p)
            html_output_head ();

          if (!paragraph_is_open)
--- 2464,2468 ----
             any order and with any omissions, and we'll still output
             the html <head> `just in time'.  */
          if ((executing_macro || !executing_string)
!             && html && !html_output_head_p && !defining_copying ())
            html_output_head ();

          if (!paragraph_is_open)




reply via email to

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