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#67173: 27.1; support raw string literals in C mode (a GNU C extension) Date: Thu, 16 Nov 2023 07:57:40 +0200 Message-ID: <83zfzep7e3.fsf@gnu.org> References: <6bf89666-40d3-4772-8add-ef8c33568881@prevas.dk> <835y23rwwk.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40662"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ravi@prevas.dk, 67173@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 16 06:59:20 2023 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 1r3VPL-000APF-BP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Nov 2023 06:59:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3VP9-0001z9-5V; Thu, 16 Nov 2023 00:59:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3VP7-0001yx-19 for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:59:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3VP5-0003Qf-6I for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:59:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3VP4-0007T1-5N for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 00:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Nov 2023 05:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67173 X-GNU-PR-Package: emacs Original-Received: via spool by 67173-submit@debbugs.gnu.org id=B67173.170011428228621 (code B ref 67173); Thu, 16 Nov 2023 05:59:02 +0000 Original-Received: (at 67173) by debbugs.gnu.org; 16 Nov 2023 05:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:54323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3VO5-0007RL-HR for submit@debbugs.gnu.org; Thu, 16 Nov 2023 00:58:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3VNz-0007R0-SC for 67173@debbugs.gnu.org; Thu, 16 Nov 2023 00:57:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3VNu-0003G6-1V; Thu, 16 Nov 2023 00:57:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GKvbCEsrel/RMJkwYWVAr7Vo07FAnKzC9HNWUPq0VsM=; b=k5mqxbrO4k/t RBtXvdT3HCt8hr/KZjZ43CHbR5oBUUr2Iaf6XyzjCRfSqm9e74kSiUFv7SPTn+6ftKu6LUgTf+qsD ImWu7quI2Epj5WpU0B74gWEw+GYb6npjPEhPFswZiEPkwyhLluOMHlJ8zZrKrTi0vrTmLEP1TSA6T dKz//lqVe+M5DbeaYEzHv0i7ZlMSOB6QWUYzyQJ7GcQrMlelIcpuCs/hAnjGOSIiJJEqEMk1laXbF efZ/xOZ5Fv/wLXUIuFmFe4wYpd+BTIFZvOG2diUPd55GEsgesvL4t4oj9372HKYfFmJHKIcX92f1f KegSAY+qR3rnBl9CWmQtIA==; In-Reply-To: (message from Alan Mackenzie on Wed, 15 Nov 2023 22:23:15 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274435 Archived-At: > Date: Wed, 15 Nov 2023 22:23:15 +0000 > Cc: Rasmus Villemoes , 67173@debbugs.gnu.org > From: Alan Mackenzie > > > > I do not know if that can be fixed by simply adding > > > c-before-change-check-raw-strings to C mode's > > > c-get-state-before-change-functions. > > That's the basic idea, yes, with another function to be added to > c-before-font-lock-functions. But there are several detailed changes > necessary, too. > > > Alan, are you looking into this? > > I am now. What's bothering me at the moment is that this is going to > make C Mode slower. I suppose I could add an option into C Mode so that > raw strings can be enabled only when they're needed, but this would be > quite awkward, and a new departure for CC Mode. We could support fontification of raw strings only when font-lock-maximum-decoration is set, or something. Any solution that makes this optional behavior is okay from where I stand, since I don't believe raw string literals will be used frequently enough to make this a UX issue.