From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug Date: Mon, 23 Nov 2020 18:57:18 +0000 Message-ID: <20201123185718.GC4635@ACM> References: <833610vw24.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30082"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42805@debbugs.gnu.org To: Eli Zaretskii , Gustavo Tavares Cabral Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 20:06:49 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 1khHAm-0007jd-WE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 20:06:49 +0100 Original-Received: from localhost ([::1]:38318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khHAm-0003Nt-2H for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 14:06:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khH2I-0000Vc-OB for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khH2I-00073d-Fq for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khH2I-00030Y-FA for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 13:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 18:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42805 X-GNU-PR-Package: emacs Original-Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.160615785511525 (code B ref 42805); Mon, 23 Nov 2020 18:58:02 +0000 Original-Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 18:57:35 +0000 Original-Received: from localhost ([127.0.0.1]:51162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khH1q-0002zp-Fc for submit@debbugs.gnu.org; Mon, 23 Nov 2020 13:57:34 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:39950 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1khH1h-0002zL-5z for 42805@debbugs.gnu.org; Mon, 23 Nov 2020 13:57:33 -0500 Original-Received: (qmail 25189 invoked by uid 3782); 23 Nov 2020 18:57:18 -0000 Original-Received: from acm.muc.de (p4fe15c1f.dip0.t-ipconnect.de [79.225.92.31]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Mon, 23 Nov 2020 19:57:18 +0100 Original-Received: (qmail 15370 invoked by uid 1000); 23 Nov 2020 18:57:18 -0000 Content-Disposition: inline In-Reply-To: <833610vw24.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:193949 Archived-At: Hello, Gustavo and Eli. On Mon, Nov 23, 2020 at 19:10:11 +0200, Eli Zaretskii wrote: > > From: Gustavo Tavares Cabral > > Date: Mon, 10 Aug 2020 16:55:40 -0300 > > Cc: bug-cc-mode@gnu.org > > I have found two related issues. Both are evident in csharp-mode, but > > can easily be reproduced in c-mode. I'll answer the second issue now (which is easy) and hopefully get round to the first one soon. > > Issue 1 (cc-mode.el): [ .... ] > > Issue 2 (maybe syntax.el): > > When syntax-propertize-function is set (to '(lambda (beg end) nil)', > > for example), a similar problem occurs if electric-pair-mode (or even > > smartparens) is enabled. The symptoms started after commit 585fb95739, > > but I don't know if it is related. > > Steps to reproduce: > > 1. Open a .c file; > > 2. Eval '(setq syntax-propertize-function (lambda (beg end) nil)'; > > 3. Enable electric-pair-mode; > > 4. Insert/delete empty strings. This is simple. syntax-propertize-function is utterly incompatible with CC Mode, and _will_ foul it up. To quote from the Emacs Lisp manual (recently added text): *Caution:* When this variable is non-`nil', Emacs removes `syntax-table' text properties arbitrarily and relies on `syntax-propertize-function' to reapply them. Thus if this facility is used at all, the function must apply *all* `syntax-table' text properties used by the major mode. In particular, Modes derived from a CC Mode mode must not use this variable, since CC Mode uses other means to apply and remove these text properties. > Alan, could you please take a look? Would it be possible to fix this > for Emacs 27.2? I hope so. Are there any firm plans for a release date, yet? -- Alan Mackenzie (Nuremberg, Germany).