From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug Resent-From: Gustavo Tavares Cabral Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42805@debbugs.gnu.org Cc: bug-cc-mode@gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15970893613678 (code B ref -1); Mon, 10 Aug 2020 19:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Aug 2020 19:56:01 +0000 Received: from localhost ([127.0.0.1]:37537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5Dto-0000xG-Dw for submit@debbugs.gnu.org; Mon, 10 Aug 2020 15:56:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:34228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5Dtl-0000x7-Np for submit@debbugs.gnu.org; Mon, 10 Aug 2020 15:55:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5Dtl-0004CU-Ay for bug-gnu-emacs@gnu.org; Mon, 10 Aug 2020 15:55:57 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:45540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5Dti-0005dW-Ub; Mon, 10 Aug 2020 15:55:57 -0400 Received: by mail-ej1-x635.google.com with SMTP id c16so10614349ejx.12; Mon, 10 Aug 2020 12:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=Xfrrc3vCzEWyaAQsSD1PqmRsDmDZRmZqBi3PNHlW2Ik=; b=uM+tg6lQURf/DpF7OWZjOOT+Ly2GGk1ZXSQPhYt7heN+ykwlAbMZE3DmU4hzw7rxJI jYy2R0oSPlAVnSXJ2r2rtcIWPXUJDbWWRangtsgkdcClQK2vDS7CBnr08Wcr/yRhlblS 6CLofHGRTOgdyP6pXoqhUkerJKWz0Up8RE9MFYMDFL9lajs1z3xRaTRfO0b2kLp1aZmA ECfCYeS8GPyNadBdq5hiFJfdBtbcKsHXS2jsgmoLdizbwMBc8E1rDksObwCZ6NanCzZk wCg+/xDqkHtdood4xBo2CO+e4lkoZ/rb+iDcBONsUjlDWaw7bzjGHP+Dkp9Vadf6a94W 08uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Xfrrc3vCzEWyaAQsSD1PqmRsDmDZRmZqBi3PNHlW2Ik=; b=lBzlXdu9O7W1Aa2fHlJh9P4i+WHGRf5vCq+7jEEWlVpoAPXtyQq4emEbxzA9io62+0 +3al5xou5b1HdB9Kh2tuw7oLhI0x5+k/ETyzCPEMhw3c/r6fMIBfZQntqADxNxG23s4u KvGl1agdf1aQuneyfcwF/JkjGdh3DaO9RizUpNCtp1z7lfL9YkGROvZV186InSpq+/Cd 4WzG0BiyZ+aA/x89hNgr60ik9w8N351cU05O0Fro5wx46QbMspte71gRWjwQlA1LrjOo WvxSo9cXjaLrB7nCy26SvUK/Nrw8dSsX0YAyXgky0CXay5UUqIHgg7EMxt9hq001+YxB NfgA== X-Gm-Message-State: AOAM5336Y634L9qIouKuFBjnlba9XYcWdXOR/4i2svweYcvEyPXrIZSs 29pgzS5iv0bNJqP9a97OVzzS/dvliSbzZmWT/la8vpPA5Mo= X-Google-Smtp-Source: ABdhPJxfTuHz3Xmisj0aoRrh8w5KDvwux/YYn1behBkz+AQbap6OLK8aBh70sjF+rWNAHsdpCNHjvw6ErzbnHpzVOR0= X-Received: by 2002:a17:906:f191:: with SMTP id gs17mr23652190ejb.145.1597089351212; Mon, 10 Aug 2020 12:55:51 -0700 (PDT) MIME-Version: 1.0 From: Gustavo Tavares Cabral Date: Mon, 10 Aug 2020 16:55:40 -0300 Message-ID: Content-Type: multipart/alternative; boundary="00000000000074252005ac8b57b1" Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=gustavotcabral@gmail.com; helo=mail-ej1-x635.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000074252005ac8b57b1 Content-Type: text/plain; charset="UTF-8" Hi, 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. In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.16.0) of 2020-08-06 built on gustavo-Lenovo-ideapad-330-15IKB Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 18.04.5 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Configured using: 'configure --with-x-toolkit=gtk3 --with-modules --with-sound=yes --with-file-notification=yes --with-mailutils --with-cairo' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP Important settings: value of $LANG: en value of $XMODIFIERS: locale-coding-system: iso-latin-1-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 44286 8232) (symbols 48 5980 1) (strings 32 15464 904) (string-bytes 1 505487) (vectors 16 9275) (vector-slots 8 124610 9084) (floats 8 20 48) (intervals 56 256 67) (buffers 1000 12)) --00000000000074252005ac8b57b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

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):

=C2=A0 When c-multiline-string-start-char is set, font locking breaks a= fter
=C2=A0 changes in str= ing literals. The issue started after commit 2ca12bb3de:
<= span style=3D"font-family:monospace">=C2=A0 I believe that '(c-remove-s= tring-fences (car end-limits))' should be
=C2=A0 '(c-remove-string-fences (1- (cd= r end-limits)))'

=C2=A0 Steps to reproduce:
=C2=A0=C2=A0=C2=A0 1. Open a .c file;
=C2=A0=C2=A0=C2=A0 2. Eval '(setq c-multiline-string-start-char ?@)= ';
=C2=A0=C2=A0=C2=A0 3. Delete/insert double quotes.

=C2=A0 I think this i= ssue is related:


Issue 2 (maybe syntax.el):

=C2=A0 When syntax-propertize-function is set (to '(lambda (beg end= ) nil)',
=C2=A0 for example), a similar problem occurs if electric-pair-mode (or= even
=C2=A0 smartparens) i= s enabled. The symptoms started after commit 585fb95739,
=C2=A0 but I don't know if it is related.=

=C2=A0 Steps to reproduce:
=C2=A0=C2=A0=C2=A0 1. Open a .c file;
=C2=A0=C2=A0=C2=A0 2. Eval '(setq syntax-propertize-function (lambd= a (beg end) nil)';
=C2=A0=C2=A0=C2=A0 3. Enable electric-pair-mode;
=C2=A0=C2=A0=C2=A0 4. Insert/delete empty strings.




In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cair= o version 1.16.0)
of 2020-08-06 built on gustavo-Lenovo-ideapad-330-15IKB
Windowing system distributor 'The X.Org Foundation', version 11.0.1= 2008000
System Description: Ubuntu 18.04.5 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Configured using:
'configure --with-x-toolkit=3Dgtk3 --with-modules --with-sound=3Dyes
--with-file-notification=3Dyes --with-mailutils --with-cairo'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2
GMP

Important settings:
value of $LANG: en
value of $XMODIFIERS:=20
locale-coding-system: iso-latin-1-unix

Major mode: Lisp Interaction

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 44286 8232)
(symbols 48 5980 1)
(strings 32 15464 904)
(string-bytes 1 505487)
(vectors 16 9275)
(vector-slots 8 124610 9084)
(floats 8 20 48)
(intervals 56 256 67)
(buffers 1000 12))

--00000000000074252005ac8b57b1-- From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug 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 X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 42805@debbugs.gnu.org, Gustavo Tavares Cabral Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.160615142425233 (code B ref 42805); Mon, 23 Nov 2020 17:11:01 +0000 Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 17:10:24 +0000 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 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 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 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 Date: Mon, 23 Nov 2020 19:10:11 +0200 Message-Id: <833610vw24.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Gustavo Tavares Cabral on Mon, 10 Aug 2020 16:55:40 -0300) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug 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 X-GNU-PR-Keywords: To: Eli Zaretskii , Gustavo Tavares Cabral Cc: 42805@debbugs.gnu.org Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.160615785511525 (code B ref 42805); Mon, 23 Nov 2020 18:58:02 +0000 Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 18:57:35 +0000 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 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 Received: (qmail 25189 invoked by uid 3782); 23 Nov 2020 18:57:18 -0000 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 Received: (qmail 15370 invoked by uid 1000); 23 Nov 2020 18:57:18 -0000 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 Content-Disposition: inline In-Reply-To: <833610vw24.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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). From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 42805@debbugs.gnu.org, gustavotcabral@gmail.com Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.160615964214653 (code B ref 42805); Mon, 23 Nov 2020 19:28:02 +0000 Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 19:27:22 +0000 Received: from localhost ([127.0.0.1]:51214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khHUg-0003oG-Lb for submit@debbugs.gnu.org; Mon, 23 Nov 2020 14:27:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khHUe-0003o2-Nw for 42805@debbugs.gnu.org; Mon, 23 Nov 2020 14:27:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52486) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khHUY-0008Ln-W5; Mon, 23 Nov 2020 14:27:15 -0500 Received: from [176.228.60.248] (port=4732 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1khHUX-0000w7-Ok; Mon, 23 Nov 2020 14:27:14 -0500 Date: Mon, 23 Nov 2020 21:27:10 +0200 Message-Id: <83k0ubvppt.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <20201123185718.GC4635@ACM> (message from Alan Mackenzie on Mon, 23 Nov 2020 18:57:18 +0000) References: <833610vw24.fsf@gnu.org> <20201123185718.GC4635@ACM> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 23 Nov 2020 18:57:18 +0000 > Cc: 42805@debbugs.gnu.org > From: Alan Mackenzie > > > 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? Plans, yes: soon. Firm, no. I have a few bug reports that I'd like to see fixed if possible; this is one of them. I hope to have an up-to-date status for all of them in a week or so, and if that succeeds, I will probably start preparing a pretest of 27.2. From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gustavo Tavares Cabral Cc: 42805@debbugs.gnu.org, Eli Zaretskii Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.160615966314689 (code B ref 42805); Mon, 23 Nov 2020 19:28:02 +0000 Received: (at 42805) by debbugs.gnu.org; 23 Nov 2020 19:27:43 +0000 Received: from localhost ([127.0.0.1]:51217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khHV0-0003or-U9 for submit@debbugs.gnu.org; Mon, 23 Nov 2020 14:27:43 -0500 Received: from colin.muc.de ([193.149.48.1]:41307 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1khHUz-0003ob-1i for 42805@debbugs.gnu.org; Mon, 23 Nov 2020 14:27:41 -0500 Received: (qmail 46010 invoked by uid 3782); 23 Nov 2020 19:27:34 -0000 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 20:27:34 +0100 Received: (qmail 15472 invoked by uid 1000); 23 Nov 2020 19:27:34 -0000 Date: Mon, 23 Nov 2020 19:27:34 +0000 Message-ID: <20201123192734.GD4635@ACM> References: <833610vw24.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <833610vw24.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Gustavo. 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. > > 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've just done this, and not noticed anything adrift other than exceptionally long delays in making the changes. Would you please state more precisely what the problem is that you see. Thanks! > > I think this issue is related: > > https://github.com/Fuco1/smartparens/issues/992 > > Issue 2 (maybe syntax.el): [ Dealt with in a separate post. ] > Alan, could you please take a look? Would it be possible to fix this > for Emacs 27.2? -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 13:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42805: 27.1; cc-mode/syntax/font-lock bug Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Aug 2021 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 42805@debbugs.gnu.org, Eli Zaretskii , Gustavo Tavares Cabral Received: via spool by 42805-submit@debbugs.gnu.org id=B42805.163008700627876 (code B ref 42805); Fri, 27 Aug 2021 17:57:02 +0000 Received: (at 42805) by debbugs.gnu.org; 27 Aug 2021 17:56:46 +0000 Received: from localhost ([127.0.0.1]:52957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJg5p-0007FN-Fb for submit@debbugs.gnu.org; Fri, 27 Aug 2021 13:56:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJg5k-0007F3-5m for 42805@debbugs.gnu.org; Fri, 27 Aug 2021 13:56:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6ANZeq/UsoDZRljp/pVQ6T6kzjZpxJMx71dgmIp+i/8=; b=lbnu7BwYid5GqxjkYCuJr7Jj/o wE/+a4uRdouLjMIqShuFAa2o/ZCgnFHqxJfIYK0k1ro8HLSrlyp7Hxyo4CgCC68TUK/lKkme5pQOT skWIt9tnmwqcWDm3Ra5u27jy3+iQqueg/BfLx3JkK5lKPo9dI0pSE6TjxBSEE9V9OYQY=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJg5Z-0006V1-34; Fri, 27 Aug 2021 19:56:29 +0200 From: Lars Ingebrigtsen References: <833610vw24.fsf@gnu.org> <20201123192734.GD4635@ACM> Date: Fri, 27 Aug 2021 19:56:24 +0200 In-Reply-To: <20201123192734.GD4635@ACM> (Alan Mackenzie's message of "Mon, 23 Nov 2020 19:27:34 +0000") Message-ID: <87mtp2lqk7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Mackenzie writes: >> > 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Mackenzie writes: >> > 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've just done this, and not noticed anything adrift other than > exceptionally long delays in making the changes. Would you please state > more precisely what the problem is that you see. Thanks! This was half a year ago, and there was no response (and I can't reproduce the problem either in 27.1 or the current trunk), so I'm closing this bug report. If the problem still exists, please respond to this email and we'll reopen the bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 27 13:56:49 2021 Received: (at control) by debbugs.gnu.org; 27 Aug 2021 17:56:49 +0000 Received: from localhost ([127.0.0.1]:52959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJg5t-0007Fa-UQ for submit@debbugs.gnu.org; Fri, 27 Aug 2021 13:56:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJg5o-0007FC-If for control@debbugs.gnu.org; Fri, 27 Aug 2021 13:56:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=p/WTnbDuwf0HUju/Zptq2TAUiUXt52ZEZz72AEUA7V0=; b=WsxuDOa+ttQIGhy6YD18fZ5znG U7yHB2qfuvHHHRwcSwgqLmVocRj/ejtqThtdcllt3TDuz5XvDTTtCJGPX9HuJP4GRHH2qJPM+TzLU uqIuFhh6z5/BKewmOLdvEIj50IAcuObFX58x/L9ib3bCXvX/cgmgfXxctzwrpau59RUY=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mJg5g-0006VG-H4 for control@debbugs.gnu.org; Fri, 27 Aug 2021 19:56:34 +0200 Date: Fri, 27 Aug 2021 19:56:32 +0200 Message-Id: <87lf4mlqjz.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #42805 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 42805 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 42805 quit