bug-texinfo
[Top][All Lists]
Advanced

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

Re: strange error message with deffnxx


From: Karl Berry
Subject: Re: strange error message with deffnxx
Date: Fri, 9 May 2003 19:51:52 -0400

    makeinfo_message_xx.texi:6: Must be in `deffnx' insertion to use `deffnxx'.
    and should be
    makeinfo_message_xx.texi:6: Must be in `deffn' insertion to use `deffnx'.

Thanks for the report, Patrice.  Here's a patch.

*** defun.c.~1.5.~      Fri Apr 25 14:16:53 2003
--- defun.c     Fri May  9 16:49:50 2003
***************
*** 443,449 ****
    if (*scan_args && **scan_args && **scan_args == '(')
      warning ("`%c' follows defined name `%s' instead of whitespace",
               **scan_args, defined_name);
!     
    if (!x_p)
      begin_insertion (type);
  
--- 443,449 ----
    if (*scan_args && **scan_args && **scan_args == '(')
      warning ("`%c' follows defined name `%s' instead of whitespace",
               **scan_args, defined_name);
! 
    if (!x_p)
      begin_insertion (type);
  
***************
*** 715,741 ****
  void
  cm_defun ()
  {
-   int x_p;
    enum insertion_type type;
!   char *temp = xstrdup (command);
! 
!   x_p = (command[strlen (command) - 1] == 'x');
  
    if (x_p)
!     temp[strlen (temp) - 1] = 0;
  
!   type = find_type_from_name (temp);
!   free (temp);
  
    /* If we are adding to an already existing insertion, then make sure
       that we are already in an insertion of type TYPE. */
    if (x_p && (!insertion_level || insertion_stack->insertion != type))
      {
!       line_error (_("Must be in `%s' insertion to use `%sx'"),
!                   command, command);
        discard_until ("\n");
        return;
      }
  
!   defun_internal (type, x_p);
  }
--- 715,740 ----
  void
  cm_defun ()
  {
    enum insertion_type type;
!   char *base_command = xstrdup (command);  /* command with any `x' removed */
!   int x_p = (command[strlen (command) - 1] == 'x');
  
    if (x_p)
!     base_command[strlen (base_command) - 1] = 0;
  
!   type = find_type_from_name (base_command);
  
    /* If we are adding to an already existing insertion, then make sure
       that we are already in an insertion of type TYPE. */
    if (x_p && (!insertion_level || insertion_stack->insertion != type))
      {
!       line_error (_("Must be in address@hidden' environment to use 
address@hidden'"),
!                   base_command, command);
        discard_until ("\n");
        return;
      }
+   else
+     defun_internal (type, x_p);
  
!   free (base_command);
  }




reply via email to

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