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#42805: 27.1; cc-mode/syntax/font-lock bug Date: Mon, 23 Nov 2020 19:10:11 +0200 Message-ID: <833610vw24.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22735"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42805@debbugs.gnu.org, Gustavo Tavares Cabral To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 18:11:31 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 1khFNC-0005mK-2y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 18:11:30 +0100 Original-Received: from localhost ([::1]:32864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khFNB-00080U-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 12:11:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khFMk-0007zQ-D8 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:11:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khFMj-0005Jg-Nx for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khFMj-0006a9-Jn for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 12:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 17:11:01 +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.160615142425233 (code B ref 42805); Mon, 23 Nov 2020 17:11:01 +0000 Original-Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 17:10:24 +0000 Original-Received: from localhost ([127.0.0.1]:50951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khFM7-0006Yv-P3 for submit@debbugs.gnu.org; Mon, 23 Nov 2020 12:10:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khFM6-0006Yg-Gu for 42805@debbugs.gnu.org; Mon, 23 Nov 2020 12:10:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48515) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khFM1-00055k-08; Mon, 23 Nov 2020 12:10:17 -0500 Original-Received: from [176.228.60.248] (port=4116 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khFLz-0000UH-60; Mon, 23 Nov 2020 12:10:15 -0500 In-Reply-To: (message from Gustavo Tavares Cabral on Mon, 10 Aug 2020 16:55:40 -0300) 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:193929 Archived-At: > 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. > > Issue 1 (cc-mode.el): > > When c-multiline-string-start-char is set, font locking breaks after > changes in string literals. The issue started after commit 2ca12bb3de: > I believe that '(c-remove-string-fences (car end-limits))' should be > '(c-remove-string-fences (1- (cdr end-limits)))' > > Steps to reproduce: > 1. Open a .c file; > 2. Eval '(setq c-multiline-string-start-char ?@)'; > 3. Delete/insert double quotes. > > I think this issue is related: > https://github.com/Fuco1/smartparens/issues/992 > > 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. Alan, could you please take a look? Would it be possible to fix this for Emacs 27.2?