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: Mon, 14 Jun 2021 20:42:37 +0300 Message-ID: <83eed45omq.fsf@gnu.org> References: <46bb9128-8bf5-e24c-2172-1cbb4202ee1d@gmail.com> <83lf7c5t6z.fsf@gnu.org> <46a10b9f-91d7-63c4-1513-0af4743e0940@gmail.com> 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="29773"; 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 Mon Jun 14 19:43:10 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 1lsqcA-0007co-FU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Jun 2021 19:43:10 +0200 Original-Received: from localhost ([::1]:49806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsqc9-0008A8-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Jun 2021 13:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsqc2-00087O-7U for bug-gnu-emacs@gnu.org; Mon, 14 Jun 2021 13:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsqc2-0002V4-09 for bug-gnu-emacs@gnu.org; Mon, 14 Jun 2021 13:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsqc1-0003OS-RJ for bug-gnu-emacs@gnu.org; Mon, 14 Jun 2021 13: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: Mon, 14 Jun 2021 17: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.162369257713034 (code B ref 47408); Mon, 14 Jun 2021 17:43:01 +0000 Original-Received: (at 47408) by debbugs.gnu.org; 14 Jun 2021 17:42:57 +0000 Original-Received: from localhost ([127.0.0.1]:47758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsqbx-0003OA-G0 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 13:42:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsqbv-0003Nv-AR for 47408@debbugs.gnu.org; Mon, 14 Jun 2021 13:42:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsqbp-0002Nl-RM; Mon, 14 Jun 2021 13:42:49 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3135 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 1lsqbn-0000uz-DN; Mon, 14 Jun 2021 13:42:49 -0400 In-Reply-To: <46a10b9f-91d7-63c4-1513-0af4743e0940@gmail.com> (message from fabrice nicol on Mon, 14 Jun 2021 19:10:53 +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:208515 Archived-At: > Cc: 47408@debbugs.gnu.org, pot@gnu.org > From: fabrice nicol > Date: Mon, 14 Jun 2021 19:10:53 +0200 > > If you take a look at other languages that implement explicit tags (like > Fortran) you will see that there are buffers coming in to avoid having > 'name' and 'linestart' (1st and 4th arguments to 'make_tag') share a > same string pointer (here 's'). > > This is explained in the header comment to 'make_tag': > > " 2. LINESTART contains name as either a rightmost, or rightmost but >  *     one character, substring;" This is just a condition for generating "implicitly named" tags. There's nothing wrong with having explicitly named tags, if there are good reasons for that. > When I applied you suggestion and tested, the TAGS base was as expected > accordingly: wrong. "Wrong" in what sense? Can you show an example of such a wrong tag? And how does Mercury differ from Prolog in this sense? prolog_pr doesn't allocate new strings before calling make_tag. Thanks.