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#64204: C/C++ local variables not syntax highlighted if they start with $ Date: Thu, 22 Jun 2023 13:13:59 +0300 Message-ID: <83wmzv3iu0.fsf@gnu.org> References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 64204@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 22 12:14:29 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 1qCHKf-0001Ik-5L for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Jun 2023 12:14:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCHKF-0006g7-Rf; Thu, 22 Jun 2023 06:14:03 -0400 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 1qCHKE-0006fq-Cv for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 06:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCHKE-0002PL-4D for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 06:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qCHKD-000317-W7 for bug-gnu-emacs@gnu.org; Thu, 22 Jun 2023 06:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jun 2023 10:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64204 X-GNU-PR-Package: emacs Original-Received: via spool by 64204-submit@debbugs.gnu.org id=B64204.168742883611579 (code B ref 64204); Thu, 22 Jun 2023 10:14:01 +0000 Original-Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 10:13:56 +0000 Original-Received: from localhost ([127.0.0.1]:34930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCHK7-00030h-Ia for submit@debbugs.gnu.org; Thu, 22 Jun 2023 06:13:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCHK5-00030R-JF for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 06:13:54 -0400 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 1qCHJz-0002MG-WE; Thu, 22 Jun 2023 06:13:48 -0400 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=dEvBrLMgLmqwNMfqkWittgR02cC+ltAPbDwpqtdnQzw=; b=SOeFP7cR+nEI wSE2C0+BJicgkwgl5CR9zEQkbKLSniP93yeG5RxDQbdGBdVqovIWaeSDUaz3ydOg1rHnd/Y4FThe7 dLKGBZ6wZ/8VmJk4R+lw9hN2dyvXlf2bPjDLsmstRik2C0Qr40LR+gUM74nOM/AiNt81Pk4pIOxD1 WFowMTFmUIZz5DEk8KfkJm5BmDwIUZYq3yYtvwYGIwbco/mPwFeJb+M6fiqJ0qaL65UOWH2rDf/ps fZCwulLwvljaI9P/juBDgHZjenPUlJv9UTdtT1r2jr3cR8cC4X/bvv6p4E2DTMmg1xGMC5gYT2HWj Ewp7GUMmkp9ihzUfXUSmgw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCHJz-0007CG-B1; Thu, 22 Jun 2023 06:13:47 -0400 In-Reply-To: (message from Alan Mackenzie on Thu, 22 Jun 2023 09:11:38 +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:263871 Archived-At: > Date: Thu, 22 Jun 2023 09:11:38 +0000 > Cc: luangruo@yahoo.com, 64204@debbugs.gnu.org > From: Alan Mackenzie > > > Thanks, but shouldn't this be optional behavior, which users should be > > able to control? Standard C disallows '$' in identifiers AFAIK, and > > some users might wish to follow the Standard. > > The thing is, such an option would be difficult to implement. At the > moment, c-symbol-start and c-symbol-key (regular expressions which match > the start of an identifier and all of one) are calculated in cc-langs.el > at compilation time. They are widely used (~40 times) in the indentation > engine and fontification. > > It would be necessary to change these constants to variables, probably > doubling the number of relevant c-lang-const's in cc-langs.el, and to add > a mechanism to toggle between them at run time. > > I don't feel that the benefit from this new option would really be worth > the work it would take to implement. I do feel it's worth the effort. If we value correct fontification, of course. I don't know what my opinions on this mean for you, but there you have it. I cannot force you make this change, of course, I can only try to convince.