unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Masatake YAMATO <jet@gyve.org>
To: harsanyi@mac.com
Cc: emacs-pretest-bug@gnu.org, pot@gnu.org, emacs-devel@gnu.org
Subject: Re: etags does not recognize function definition in C file
Date: Thu, 15 Nov 2007 17:28:40 +0900 (JST)	[thread overview]
Message-ID: <20071115.172840.175242707.jet@gyve.org> (raw)
In-Reply-To: <0DFBDD07-237A-40D6-89A6-78050F0FF523@mac.com>

[-- Attachment #1: Type: Text/Plain, Size: 1038 bytes --]

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  <jet@gyve.org>

	* 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. */

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2007-11-15  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14  8:53 etags does not recognize function definition in C file Alexandru Harsanyi
2007-11-15  8:28 ` Masatake YAMATO [this message]
2007-11-15 12:16   ` Francesco Potorti`
2007-11-15 12:44     ` Masatake YAMATO
2007-11-16  8:06   ` Alexandru Harsanyi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071115.172840.175242707.jet@gyve.org \
    --to=jet@gyve.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=harsanyi@mac.com \
    --cc=pot@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).