From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#43558: [PATCH]: Fix (forward-comment 1) when end delimiter is escaped. Date: Sun, 22 Nov 2020 22:39:08 +0200 Message-ID: <73ccc858-dd03-248f-4b89-5679a8f3cd63@yandex.ru> References: <20200923144824.GD6178@ACM> <20200924102022.GA4714@ACM> <20201119211822.GE6259@ACM> <20201122131231.GB5912@ACM> <20201122170830.GD5912@ACM> <20201122181957.GF5912@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11009"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 43558@debbugs.gnu.org, Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 22 21:40:11 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 1kgw9b-0002mH-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 21:40:11 +0100 Original-Received: from localhost ([::1]:60544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgw9a-0004DN-Am for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 15:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgw9S-0004DC-2m for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 15:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgw9R-0000Eb-Rl for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 15:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kgw9R-0006tO-Po for bug-gnu-emacs@gnu.org; Sun, 22 Nov 2020 15:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Nov 2020 20:40: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.160607756026440 (code B ref 43558); Sun, 22 Nov 2020 20:40:01 +0000 Original-Received: (at 43558) by debbugs.gnu.org; 22 Nov 2020 20:39:20 +0000 Original-Received: from localhost ([127.0.0.1]:48407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgw8l-0006sN-Nm for submit@debbugs.gnu.org; Sun, 22 Nov 2020 15:39:19 -0500 Original-Received: from mail-wm1-f42.google.com ([209.85.128.42]:51434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kgw8j-0006s9-Gg for 43558@debbugs.gnu.org; Sun, 22 Nov 2020 15:39:18 -0500 Original-Received: by mail-wm1-f42.google.com with SMTP id a186so13297760wme.1 for <43558@debbugs.gnu.org>; Sun, 22 Nov 2020 12:39:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=we0OKaJpFtvrHjCMuQ65e8O/kze9zH4xzTXK8b23pHc=; b=PGL3GYyFx1g6FIUO02XERuAiQMW1iZMlPqSpiMVHOawiW0mWHE5yyyfDTHCaR8jePr 40ZHAIKyURk5Kh9+kxkHef+XX9aUDYx4/jb7jCaBtcxkth5ehBOWvHmn+CKK6hWoHHiD gVwK+tzL54XdIMRKnlpwEKodmqzFIGbKS5j+7ZuumUUat0txj50KQJ3s8mTOpkho10j/ N+PAdTI2tv6W4DMvoeuFzgypb23qieuqKZuaTeSC12jix0jk3adESICGmegVLnAQglaU 89olzuP0p3LfsSjF4wUYb8Pin5KH3pwPAlSPbtmgls/idLC4hCWe6178rc17cOJwqDG9 6tIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=we0OKaJpFtvrHjCMuQ65e8O/kze9zH4xzTXK8b23pHc=; b=HCuyzhBjFUyqxTR9cukIKuP+1SS/0WQDa+t/K0moxBiIqDOEF48UddSmDEArAy8laC YS1Z6e1FofDIRDDxPDXkeBsVx9sbISGCYjt6um0txjEZN55IUnZ4tQzG44H/5dy/LtbK Dqq5d8SSMTUZgMfh8Z/gas8Bfawc0QkF7OhzBeYQIRmJNq2QmocV2Ilog3oEUoGeAEjx FGwz2INkKMapcIdb5RKrbf3gwkFXl7ghHgqztZYaV6cKf8rVfPQDhjplYdVpq5fvdoQn Hkot3nCv9lk9bPvYsAVSjgwU9M7VAMLVbTJByuAcyCSv4di/2AyGgNRltmiPlSPKqlgS d2hA== X-Gm-Message-State: AOAM531vnML/QTE2cL3MTifQBsAKI668ikdsC1XrwZFo//kf2599Rxys lvORT6MYAfCG8PyDLfp9Iz4= X-Google-Smtp-Source: ABdhPJyWxieBuTB4IpZxaUq54/s1BEvlB4KxnARAv3KS0oSuyXSpO986ItjmDjn7JNg9Dt7IWOFkSg== X-Received: by 2002:a7b:c841:: with SMTP id c1mr19940427wml.31.1606077551623; Sun, 22 Nov 2020 12:39:11 -0800 (PST) Original-Received: from [192.168.0.4] ([66.205.71.3]) by smtp.googlemail.com with ESMTPSA id d128sm13173574wmc.7.2020.11.22.12.39.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Nov 2020 12:39:10 -0800 (PST) In-Reply-To: <20201122181957.GF5912@ACM> Content-Language: en-US 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:193875 Archived-At: On 22.11.2020 20:19, Alan Mackenzie wrote: > Hello, Dmitry. > > On Sun, Nov 22, 2020 at 19:46:24 +0200, Dmitry Gutov wrote: >> On 22.11.2020 19:08, Alan Mackenzie wrote: >>> Really? Are there any other programming language modes whose comments >>> syntax.c cannot handle without syntax-table text properties? > >> Ruby is just one example. > > Thanks. > > I've just searched the web for that. Ruby has block comment delimiters > =begin and =end. > > It would be possible to handle these in syntax.c, but somewhat clumsy > and awkward. Just like the C comments syntax discussed here. > Presumably ruby-mode handles these with syntax-table text properties > applied to the = sign and the terminating d, which is a little clumsy, > but not too bad, at the Lisp level. This is just two more regexps to search for (and propertize). I don't expect that the slowdown from them is in any way perceptible. And the general point is that the Emacs syntax table structure doesn't necessarily have to mirror the syntax of the C language.