emacs-devel
[Top][All Lists]
Advanced

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

Re: etags does not recognize function definition in C file


From: Masatake YAMATO
Subject: Re: etags does not recognize function definition in C file
Date: Thu, 15 Nov 2007 17:28:40 +0900 (JST)

Hi,

Thank you for reporting the bug.

Following patch for etags.c in the latest emacs CVS repository may fix the 
problem you reported. However, I'm not sure this fix is really o.k.
Please, test this.

I shortened the test case to make tracking the automaton easier:

    T f(){if(x){}
    }T i;

and

    T f(){if(x){;}
    }T i;
 
2007-11-15  Masatake YAMATO  <address@hidden>

        * etags.c (C_entries): Set fvnone to fvdef in
        the case (!ignoreindent && lp == newlb.buffer + 1).

--- etags.c     17  8月 2007 05:09:37 +0900    3.77
+++ etags.c     15 11月 2007 17:20:33 +0900    
@@ -4006,9 +4006,10 @@
                  bracelev = 0;
                  token.valid = FALSE; /* something gone amiss, token 
unreliable */
                }
-             if (bracelev == 0 && fvdef == vignore)
-               fvdef = fvnone;         /* end of function */
            }
+         if (bracelev == 0 && fvdef == vignore)
+           fvdef = fvnone;             /* end of function */
+
          popclass_above (bracelev);
          structdef = snone;
          /* Only if typdef == tinbody is typdefbracelev significant. */

reply via email to

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