From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47408: [PATCH] Etags support for Mercury -- fix explicit tags for existentially-quantified procedures Date: Thu, 17 Jun 2021 14:42:47 +0300 Message-ID: <83wnqszphk.fsf@gnu.org> References: <46bb9128-8bf5-e24c-2172-1cbb4202ee1d@gmail.com> <83lf7c5t6z.fsf@gnu.org> <46a10b9f-91d7-63c4-1513-0af4743e0940@gmail.com> <83eed45omq.fsf@gnu.org> <83y2b8zrxa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21615"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47408@debbugs.gnu.org To: Fabrice Nicol Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 17 13:43:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltqQS-0005T0-2y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 13:43:12 +0200 Original-Received: from localhost ([::1]:49768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltqQQ-0007G2-8D for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 07:43:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltqQI-0007Fn-7i for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 07:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42343) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltqQH-0007GU-VE for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 07:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltqQH-0006SC-Ps for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 07:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Jun 2021 11:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47408 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 47408-submit@debbugs.gnu.org id=B47408.162393017524794 (code B ref 47408); Thu, 17 Jun 2021 11:43:01 +0000 Original-Received: (at 47408) by debbugs.gnu.org; 17 Jun 2021 11:42:55 +0000 Original-Received: from localhost ([127.0.0.1]:53889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltqQA-0006Rp-OC for submit@debbugs.gnu.org; Thu, 17 Jun 2021 07:42:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltqQ7-0006Rc-LR for 47408@debbugs.gnu.org; Thu, 17 Jun 2021 07:42:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58862) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltqQ1-00076L-Gi; Thu, 17 Jun 2021 07:42:45 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4213 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltqQ1-00013Y-4c; Thu, 17 Jun 2021 07:42:45 -0400 In-Reply-To: (message from Fabrice Nicol on Thu, 17 Jun 2021 13:19:26 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208662 Archived-At: > From: Fabrice Nicol > Date: Thu, 17 Jun 2021 13:19:26 +0200 > Cc: Francesco Potortì , 47408@debbugs.gnu.org > > 1. It adds tags for some identifiers that AFAUI are actually > keywords, and shouldn't be in the TAGS tables. Examples: > "interface" (e.g., on line 146 of accumulator.m) and > "implementation" (e.g., on line 166). I guess this is unintended? > If so, how to fix it? > > This is intended. I commented this in the commit message (one-word declarations). Understood, thanks. > To fix this second issue, I propose the change below, which should > be applied on top of your patches: > > diff --git a/lib-src/etags.c b/lib-src/etags.c > index 370e825..2b0288e 100644 > --- a/lib-src/etags.c > +++ b/lib-src/etags.c > @@ -6585,10 +6585,8 @@ mercury_pr (char *s, char *last, ptrdiff_t lastlen) > && c_isspace (s[pos - namelength - offset])) > --offset; > > - /* There is no need to correct namelength or call notinname. */ > - s[pos - offset - 1] = '\0'; > - > - make_tag (s + pos - namelength - offset, namelength, true, s, pos, lineno, linecharno); > + make_tag (s + pos - namelength - offset, namelength - 1, true, > + s, pos - offset - 1, lineno, linecharno); > return pos; > } > > I've verified that etags after this change still produces the correct > TAGS file, including for the file univ.m you sent up-thread. > > Do you agree with the changes I propose? If not, could you please > explain what I miss here? > > OK, this is another way of achieving an equivalent result. Please leave me until tomorrow to perform more > tests so that I can formally confirm that this is fine. Thanks. I also plan on adding a few lines from univ.m to accumulator.m, because those few lines use a feature accumulator.m doesn't. Is this OK with you?