From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#5624: 23.1; etags elisp and scheme "=" in names Date: Tue, 13 Jun 2017 17:28:51 +0300 Message-ID: <83lgow3qsc.fsf@gnu.org> References: <87eikcrkg8.fsf@blah.blah> <878tkztic2.fsf@gmail.com> <83poea60fz.fsf@gnu.org> <87shj553hu.fsf@gmail.com> <83fuf55m6a.fsf@gnu.org> <87mv9c36mq.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1497365178 14924 195.159.176.226 (13 Jun 2017 14:46:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Jun 2017 14:46:18 +0000 (UTC) Cc: 5624@debbugs.gnu.org, user42@zip.com.au To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 13 16:46:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKn55-0003L2-QK for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Jun 2017 16:46:07 +0200 Original-Received: from localhost ([::1]:43692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKn5B-0003qS-5K for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Jun 2017 10:46:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKmpa-0004xq-VR for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2017 10:30:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKmpX-00076M-0P for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2017 10:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43379) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKmpW-00076H-TN for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2017 10:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dKmpW-0004ab-KX for bug-gnu-emacs@gnu.org; Tue, 13 Jun 2017 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Jun 2017 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5624 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5624-submit@debbugs.gnu.org id=B5624.149736416117572 (code B ref 5624); Tue, 13 Jun 2017 14:30:02 +0000 Original-Received: (at 5624) by debbugs.gnu.org; 13 Jun 2017 14:29:21 +0000 Original-Received: from localhost ([127.0.0.1]:46056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKmoo-0004ZI-4N for submit@debbugs.gnu.org; Tue, 13 Jun 2017 10:29:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKmoj-0004Z3-CB for 5624@debbugs.gnu.org; Tue, 13 Jun 2017 10:29:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKmoa-0006nx-39 for 5624@debbugs.gnu.org; Tue, 13 Jun 2017 10:29:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKmoa-0006nr-00; Tue, 13 Jun 2017 10:29:04 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4473 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKmoY-0000Ic-UO; Tue, 13 Jun 2017 10:29:03 -0400 In-reply-to: <87mv9c36mq.fsf@gmail.com> (message from Alex on Mon, 12 Jun 2017 21:31:57 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133553 Archived-At: > From: Alex > Cc: user42@zip.com.au, 5624@debbugs.gnu.org > Date: Mon, 12 Jun 2017 21:31:57 -0600 > > > I think it would be much cleaner not to use get_tag for these > > languages, but instead either call make_tag directly or write a > > get_lispy_tag function which will DTRT for Lisp-like languages. > > > > Thanks. > > I wanted to reduce duplicated code, but I suppose it is cleaner that > way. > > I've attached a patch below. Thanks. This looks OK to me, but please also add a test for this problem, and make sure the previous tests still succeed. (The etags test suite is in test/manual/etags/.) > +/* Similar to get_tag, but include '=' as part of the tag. */ > +static void > +get_lispy_tag (register char *bp, char **namepp) > +{ > + register char *cp = bp; > + > + if (*bp != '\0') > + { > + /* Go till you get to white space or a syntactic break */ > + for (cp = bp + 1; !notinname (*cp) || *cp == '='; cp++) > + continue; > + make_tag (bp, cp - bp, true, > + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); > + } > + > + if (namepp != NULL) > + *namepp = savenstr (bp, cp - bp); > +} It looks like none of the callers uses a non-NULL 2nd arg, so perhaps just remove it, and its supporting code.