From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#43558: [PATCH]: Fix (forward-comment 1) when end delimiter is escaped. Date: Sun, 22 Nov 2020 18:00:40 -0500 Message-ID: References: <20201119211822.GE6259@ACM> <20201122131231.GB5912@ACM> <20201122170830.GD5912@ACM> <20201122181957.GF5912@ACM> <73ccc858-dd03-248f-4b89-5679a8f3cd63@yandex.ru> <20201122211353.GH5912@ACM> <00dc580c-3b48-c185-9020-2cb2b7528884@yandex.ru> <20201122220110.GI5912@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40924"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43558@debbugs.gnu.org, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Dmitry Gutov To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 00:01:15 2020 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 1kgyM6-000AYl-K8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 00:01:14 +0100 Original-Received: from localhost ([::1]:33124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgyM5-0003wz-CQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 18:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgyLu-0003wb-A1 for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 18:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgyLu-0007Gv-28 for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 18:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kgyLt-00049F-WC for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 18:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Nov 2020 23:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43558-submit@debbugs.gnu.org id=B43558.160608605215922 (code B ref 43558); Sun, 22 Nov 2020 23:01:01 +0000 Original-Received: (at 43558) by debbugs.gnu.org; 22 Nov 2020 23:00:52 +0000 Original-Received: from localhost ([127.0.0.1]:48505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgyLj-00048k-OP for submit@debbugs.gnu.org; Sun, 22 Nov 2020 18:00:51 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgyLh-00048X-6e for 43558@debbugs.gnu.org; Sun, 22 Nov 2020 18:00:50 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7ADA6440649; Sun, 22 Nov 2020 18:00:43 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EAB59440490; Sun, 22 Nov 2020 18:00:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1606086041; bh=ZRvD0cyPvaCSD681PKOywyNOvbGYErNLVkcBMtNux9E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TZu+5VxcJgb5Lsti4tEe3JLL07Qvv+VofGbMf8t8Pa2WZ3t2XcAWbNsWVk0pRYJBE 4jd3gQhVRxQrLU8ZwtfaHc31M6vdpRvj3bNC5PmqV+AlZEQp9iM3xO+sTejl0Q65xD tWE9viSGfV/pzQaBnb7u9XRGxj8CelJDpuT/ujqgOyrGpgjgRRD6OrCtv37Fahji46 jHqIwpc0pqf6zJIHXFGIq9/0OoMYDTvbcCKsKgr+LOFy25v8/u3WkVF6oIXIHKvnGn a6XFJs9pjLOCQh4VZ12AfrGlym1mhztKMI1C0dUUXBDCGKLIMpwDk1cuWmCO080qBH Ybx/VtIpsJ0NA== Original-Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A66EA1203BC; Sun, 22 Nov 2020 18:00:41 -0500 (EST) In-Reply-To: <20201122220110.GI5912@ACM> (Alan Mackenzie's message of "Sun, 22 Nov 2020 22:01:10 +0000") 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:193884 Archived-At: > It provides a mechanism which might be useful to other major modes in > the future. FWIW, I doubt it. In my experience these details never quite match. >> With user experience (speed, latencies, etc) being equal or within the >> margin of error, I think it's more logical to go with simpler data >> structures and low level APIs. > Fixing things in syntax.c was simpler than a Lisp solution using > syntax-table text properties would have been. I find it hard to take this statement seriously after having seen my sm-c-mode patch. >> Finally, as I recall you feel strongly about supporting older Emacs >> versions, a significant number of them. Doing that fix in Lisp would >> allow you to fix the bug for those versions too. Not just Emacs 28+. > Yes. That appears to be the sole drawback of the fix being in syntax.c. I don't really find this to be a drawback since I don't care about CC-mode's support for multiline `//` comments in older Emacsen. But the added complexity in the C code and in the API documentation for the sole benefit of C (and C++?) mode is a drawback, yes. I do want to clarify my position, tho: while I don't like your patch very much because I think a Lisp-level solution (like the one I used in sm-c-mode) is preferable I find your patch acceptable. Stefan