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: Sat, 08 Jul 2017 11:28:02 +0300 Message-ID: <83fue7l4dp.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> <83lgow3qsc.fsf@gnu.org> <877f0erzj6.fsf@lylat> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1499502555 15395 195.159.176.226 (8 Jul 2017 08:29:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Jul 2017 08:29:15 +0000 (UTC) Cc: 5624-done@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 Sat Jul 08 10:29:10 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 1dTl70-0003k4-9z for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jul 2017 10:29:10 +0200 Original-Received: from localhost ([::1]:60309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTl75-0000op-Ni for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jul 2017 04:29:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTl6v-0000o3-GK for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 04:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTl6s-0007zH-Cw for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 04:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTl6s-0007z2-A2 for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 04:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dTl6s-0004ia-5d for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 04:29:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jul 2017 08:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 5624 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 5624@debbugs.gnu.org, eliz@gnu.org, user42@zip.com.au Original-Received: via spool by 5624-done@debbugs.gnu.org id=D5624.149950250218083 (code D ref 5624); Sat, 08 Jul 2017 08:29:01 +0000 Original-Received: (at 5624-done) by debbugs.gnu.org; 8 Jul 2017 08:28:22 +0000 Original-Received: from localhost ([127.0.0.1]:57281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTl6E-0004ha-Jn for submit@debbugs.gnu.org; Sat, 08 Jul 2017 04:28:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTl6C-0004hN-UO for 5624-done@debbugs.gnu.org; Sat, 08 Jul 2017 04:28:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTl64-00060L-Hh for 5624-done@debbugs.gnu.org; Sat, 08 Jul 2017 04:28:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTl64-0005zw-Dj; Sat, 08 Jul 2017 04:28:12 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1620 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dTl63-0003TU-Jz; Sat, 08 Jul 2017 04:28:12 -0400 In-reply-to: <877f0erzj6.fsf@lylat> (message from Alex on Wed, 14 Jun 2017 16:10:37 -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:134328 Archived-At: > From: Alex > Cc: user42@zip.com.au, 5624@debbugs.gnu.org > Date: Wed, 14 Jun 2017 16:10:37 -0600 > > Eli Zaretskii writes: > > >> 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. > > Alright, I did both. Thanks, pushed to master. Sorry for such a long delay in pushing.