From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco =?UTF-8?Q?Potort=C3=AC?= Newsgroups: gmane.emacs.bugs Subject: bug#5600: 23.1; etags don't tag (defvar foo) declaration Date: Fri, 19 Feb 2010 10:32:05 +0100 Message-ID: References: <87mxz6ayc7.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1266578719 3704 80.91.229.12 (19 Feb 2010 11:25:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2010 11:25:19 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, owner@debbugs.gnu.org, 5600@debbugs.gnu.org To: Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 19 12:25:16 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NiQyw-00063w-6I for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 12:25:15 +0100 Original-Received: from localhost ([127.0.0.1]:34635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiQyu-0002sT-U5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 06:25:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiQwl-0001xR-Np for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 06:22:59 -0500 Original-Received: from [140.186.70.92] (port=52680 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiQwj-0001w8-8l for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 06:22:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NiQwh-0007LE-MQ for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 06:22:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42310) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiQwh-0007L6-JG for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 06:22:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NiQlC-0000Q3-Jm; Fri, 19 Feb 2010 06:11:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Feb 2010 11:11:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5600 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12665778471583 (code B ref -1); Fri, 19 Feb 2010 11:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Feb 2010 11:10:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiQkv-0000PQ-2H for submit@debbugs.gnu.org; Fri, 19 Feb 2010 06:10:45 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiPDz-0007nX-9N for submit@debbugs.gnu.org; Fri, 19 Feb 2010 04:32:39 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:58482 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiPDw-00084v-Ht for submit@debbugs.gnu.org; Fri, 19 Feb 2010 04:32:36 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NiPDu-0002jo-Ov for submit@debbugs.gnu.org; Fri, 19 Feb 2010 04:32:36 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:54750) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NiPDu-0002jP-Ie for submit@debbugs.gnu.org; Fri, 19 Feb 2010 04:32:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiPDu-0005si-1e for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 04:32:34 -0500 Original-Received: from [140.186.70.92] (port=34684 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiPDt-0005rx-6X for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 04:32:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NiPDr-0002Ax-8A for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 04:32:32 -0500 Original-Received: from blade3.isti.cnr.it ([194.119.192.19]:56294) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiPDr-0002Al-1P for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 04:32:31 -0500 Original-Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.5-b2 #31825) id <01NJUDSC8XGGBG35B8@mx.isti.cnr.it> for bug-gnu-emacs@gnu.org; Fri, 19 Feb 2010 10:32:06 +0100 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.5-b2 #31826) with ESMTPSA id <01NJUDSAP4A0BJSE3W@mx.isti.cnr.it>; Fri, 19 Feb 2010 10:32:04 +0100 (MET) Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.71) (envelope-from ) id 1NiPDR-0000nM-BZ; Fri, 19 Feb 2010 10:32:05 +0100 In-reply-to: <87mxz6ayc7.fsf@blah.blah> X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 19 Feb 2010 06:10:41 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 19 Feb 2010 06:11:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35192 Archived-At: >I found the tripe-negative of while(!noninname) hard to follow and >thought a skip_name() could be clearer. It might be shared by >Perl_functions, PHP_functions and Makefile_functions. Yes, but the helper should go together with the other helper funciotns (right after skip_non_spaces) and be declared at the beginning after skip_non_spaces. > >2010-02-18 Kevin Ryde > > * etags.c (Lisp_functions): Don't tag "(defvar foo)" declarations. > (skip_name): New helper. > >--- etags.c.~3.93.~ 2009-11-29 08:42:32.000000000 +1100 >+++ etags.c 2010-02-19 10:53:57.000000000 +1100 >@@ -4849,6 +4849,16 @@ > get_tag (dbp, NULL); > } > >+/* skip past any chars at cp which are "name" class */ >+static char * >+skip_name (char *cp) >+{ >+ /* '\0' is a notinname() so loop stops there too */ >+ while (! notinname (*cp)) >+ cp++; >+ return cp; >+} >+ > static void > Lisp_functions (inf) > FILE *inf; >@@ -4858,6 +4868,17 @@ > if (dbp[0] != '(') > continue; > >+ /* ignore declaration "(defvar foo)", it's not a definition */ >+ { >+ char *p = dbp+1; >+ if (LOOKING_AT (p, "defvar")) { >+ p = skip_name (p); /* past var name */ >+ p = skip_spaces (p); >+ if (*p == ')') >+ continue; >+ } >+ } >+ > if (strneq (dbp+1, "def", 3) || strneq (dbp+1, "DEF", 3)) > { > dbp = skip_non_spaces (dbp); > > > >In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) > of 2009-09-14 on raven, modified by Debian >configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''