From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 07:27:42 2023 Received: (at submit) by debbugs.gnu.org; 21 Jun 2023 11:27:42 +0000 Received: from localhost ([127.0.0.1]:60777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBvzx-0001SB-Gc for submit@debbugs.gnu.org; Wed, 21 Jun 2023 07:27:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:39410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBiNa-000709-UL for submit@debbugs.gnu.org; Tue, 20 Jun 2023 16:55:12 -0400 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 1qBiNa-00030W-1Q for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 16:55:10 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBiNW-000237-Nu for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 16:55:09 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso4244620a12.3 for ; Tue, 20 Jun 2023 13:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687294504; x=1689886504; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=UFi5bIhS1EXg8dXga8ZKmIyQTLsyZ73Xa7nWVBzCB9I=; b=WFBc0L//yPGMOJdhwFOhMf1BSBVgyGALGfq9pKZZQPCyClFUwoxBUXP+n3HiT9Pcsg qa3kOY6qjKYbnvIpG54OGsdyuCfXto3oNi+bybpZPh2VpCvPOo2HHywQKo1IWjfwZerL mau76C8J0Rg33Ri53g4gi9CxBH1ySeRiiMiMGR2T4zYyFiJ2V3fPHQLQ4HOvWKSZTmjB SRQKBILeh7SAz/YmTYWraZ9NHsH5FbfKoGS8MRirU8nOqiPtNMbLwj2/GOhXWouOfpKL XswZ9Ns11Gw2l5b5rxInrtN0Na8awWogGAZW9tkRKWExv2s8+TiBwv6v6L5f3+KnbEVL k6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687294504; x=1689886504; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UFi5bIhS1EXg8dXga8ZKmIyQTLsyZ73Xa7nWVBzCB9I=; b=U8dOQ9NhF9lWA0yg1Ni+xc1604logpCiUmQVWkkVoYpr8ycSPSvhbx7LPojejeYQbs 7heT03vsjHPVdIXiQlnp0uCEtB9cltBcMwqfuwJvEyibUciakFslA8AXf5ZEVJhHh7tj FEL9itaVLGoR3fGRU4pVZuTMT0SVnVvYgiIkr/i2Lb2k8xhy0ONwoPff5zxlGXTj6CCD 5XLTpbaBufif5qFAVUviOPCdxMDXWUFb1YXB3EYXlXTkk206E6DjPz+uNURUiOiqOOKA Vf6KXIbFZg74CCs0zP0VLvAw5Ipx6YRmxPUx0Hu8QHooL4ZsvUGgKxG6M6IGy3yGHHD7 A2aw== X-Gm-Message-State: AC+VfDwtK4M1/K7WINuv3qlze8+iVKkMANgbSmUBrJi+KpUmttiiKMzf UTmgfUmlsaHc8S8Jx0JRnH+JedAfNGgTcxbq3BHn1UjeZ2Q= X-Google-Smtp-Source: ACHHUZ6eiX78drulCEDs76sf751HA++M4v8JlgvPUY/A5uuq7vOPuJ05Nj5joQthOKzb/uP5+KCx8qlzaZbOgXiD8vY= X-Received: by 2002:a05:6a20:42a2:b0:122:15d8:26ee with SMTP id o34-20020a056a2042a200b0012215d826eemr5976555pzj.45.1687294504069; Tue, 20 Jun 2023 13:55:04 -0700 (PDT) MIME-Version: 1.0 From: Joseph Garvin Date: Tue, 20 Jun 2023 15:54:52 -0500 Message-ID: Subject: C/C++ local variables not syntax highlighted if they start with $ To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="0000000000008befcb05fe95dde6" Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=k04jg02@gmail.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 21 Jun 2023 07:27:39 -0400 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.1 (--) --0000000000008befcb05fe95dde6 Content-Type: text/plain; charset="UTF-8" Start emacs with `emacs -Q`, press C-x C-f and type in a filename that ends in .cpp like "foo.cpp". Then type in: int main() { int a = 0; int b = 0; int $ = 0; int d$ = 0; int $e = 0; } Yes it compiles! GCC, Clang, and MSVC all have a non-standard extension that allows $ signs to appear in C/C++ variable and type names: https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html Then a,b,d$ will be highlighted correctly as local vars, but not $ or $e. The highlighting doesn't appear to work whenever $ is the first or only character. Since emacs is accepting of the $ sign anywhere else in the variable name, I suspect supporting $ was intended, even though it's non-standard. Even if not intended, it's a popular syntax extension supported by the major current compilers and whose history goes back to the DEC compiler, so support would be nice. In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2021-05-14 built on eruv Repository revision: efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Ubuntu 20.04.6 LTS --0000000000008befcb05fe95dde6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Start emacs with `emacs -Q`, press C-x C-f and type in a f= ilename that
ends in .cpp like "foo.cpp". Then type in:
int main()
{
=C2=A0 =C2=A0 int a =3D 0;
=C2=A0 =C2=A0 int b =3D 0= ;
=C2=A0 =C2=A0 int $ =3D 0;
=C2=A0 =C2=A0 int d$ =3D 0;
=C2=A0 = =C2=A0 int $e =3D 0;
}

Yes it compiles! GCC, Clang, and MSVC all = have a non-standard
extension that allows $ signs to appear in C/C++ va= riable and type
names: https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html=

Then a,b,d$ will be highlighted correctly as local vars, but no= t $ or
$e. The highlighting doesn't appear to work whenever $ is the= first or
only character. Since emacs is accepting of the $ sign anywher= e else in
the variable name, I suspect supporting $ was intended, even t= hough it's
non-standard. Even if not intended, it's a popular sy= ntax
extension supported by the major current compilers and whose histor= y
goes back to the DEC compiler, so support would be nice.

In GNU= Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16= .0, Xaw3d scroll bars)
=C2=A0of 2021-05-14 built on eruv
Repository r= evision: efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9
Repository branch: mas= ter
Windowing system distributor 'The X.Org Foundation', version= 11.0.12013000
System Description: Ubuntu 20.04.6 LTS

--0000000000008befcb05fe95dde6-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 07:52:07 2023 Received: (at 64204) by debbugs.gnu.org; 21 Jun 2023 11:52:07 +0000 Received: from localhost ([127.0.0.1]:60808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBwNb-0004fz-Fu for submit@debbugs.gnu.org; Wed, 21 Jun 2023 07:52:07 -0400 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:41465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBwNY-0004fU-Ux for 64204@debbugs.gnu.org; Wed, 21 Jun 2023 07:52:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687348318; bh=FngHUd5hwsviZ5X0RYJQOJCLvylu0XO5tlvCaFCquH0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=sCt4v+1NMT+PupH/YPQCEHVRFFQ0a/MehQ6ttLuIfXECp5HoGjOyY3KXH4WMajj2XNQhGhvom/K9Uhs3Od3HSStvlbhC3/7k/RBVTcsTN0BRIURA95k0bNnXeacwSeH7neNzPu4B/1JiXYq/pEVCq4HiIq9PzFrcxcfF0FJmbd35UFSAK0HSAd05ERYuNv7+NYYyY2gJv9Lt5f47AweGU53YH9Ocu7Jda4QN7TR7RHH5pTUip0gmYsivkoQrn1p2C1uDetkHFGHDw6P6IkoAAg3G3IwerduU/TTvxgqbWg03vL5lqd7ECDTR/tdd6EqNrs6uI4jBJRgkdPG3m/d2Yw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687348318; bh=t8dDrp4Ear5dt1dQHM69xJqqKSdFb3WoLWSgAuREPen=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=rss2+4Z8mGUGyiCEm6aM7Ky1+QboNohbxAncYBuSvp8mO5XcvSccSrsUDPdFErce5Td9tLfQgjf5r6tTStufhreVLyDY2HNUkxLEmpXo52A/monhi3/+rPatDy7VoMCPK1gHcTG1S39YJH6ysCKBCtJFUf3BrwgHbh6bszgQKpMn956QfeuCLSwBVyIW3nZs/xKJR7fNW3J7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T67wUM8CsfAe3F6XHoVcRPVB5KlDexJ2pfRskBEHJFQeH5A.HsYB JEXs12pQ.oTSOrC22blsfOaHYaUh166TPfqiZ6mgUpArggxySxZC.nFH0sbz5rLw0XFI2Weav8Nt l2BuZMtCdyiAJjYUMH6dkaH8_RE4ViympZ_QOaQj2ZjCCFvG.iKIkQh3UYJ5uRJ7TonH.G3CLA9Z RsBQqg8vTULMxufUCN76u6YSJGq7iTqKadwA6Fj0HoFPNtzWpVDURvTOtBZphpOLv_MjhSjeGxww DLRE6KjQpciKA4nBrwhEVBuGjqVlGdgbKHmuZ1dm4rnCjLO.6676OZypId9K78j4sAbZG X-Sonic-MF: X-Sonic-ID: be25f04c-eb13-4752-8d63-053b0e701f69 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Wed, 21 Jun 2023 11:51:58 +0000 Received: by hermes--production-sg3-748897c457-q47mh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 650f0311feb92d268a13059005dbbad8; Wed, 21 Jun 2023 11:51:55 +0000 (UTC) From: Po Lu To: Joseph Garvin Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: (Joseph Garvin's message of "Tue, 20 Jun 2023 15:54:52 -0500") References: Date: Wed, 21 Jun 2023 19:51:50 +0800 Message-ID: <87edm52fu1.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1017 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: Alan Mackenzie , 64204@debbugs.gnu.org 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 (-) Joseph Garvin writes: > Start emacs with `emacs -Q`, press C-x C-f and type in a filename that > ends in .cpp like "foo.cpp". Then type in: > > int main() > { > int a = 0; > int b = 0; > int $ = 0; > int d$ = 0; > int $e = 0; > } > > Yes it compiles! GCC, Clang, and MSVC all have a non-standard > extension that allows $ signs to appear in C/C++ variable and type > names: https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html > > Then a,b,d$ will be highlighted correctly as local vars, but not $ or > $e. The highlighting doesn't appear to work whenever $ is the first or > only character. Since emacs is accepting of the $ sign anywhere else in > the variable name, I suspect supporting $ was intended, even though it's > non-standard. Even if not intended, it's a popular syntax > extension supported by the major current compilers and whose history > goes back to the DEC compiler, so support would be nice. This is a bug indeed. Alan, would you please look into this? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 15:25:50 2023 Received: (at 64204) by debbugs.gnu.org; 21 Jun 2023 19:25:50 +0000 Received: from localhost ([127.0.0.1]:34233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC3Sg-0000XH-EW for submit@debbugs.gnu.org; Wed, 21 Jun 2023 15:25:50 -0400 Received: from mx3.muc.de ([193.149.48.5]:33683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC3Se-0000X2-Go for 64204@debbugs.gnu.org; Wed, 21 Jun 2023 15:25:49 -0400 Received: (qmail 87841 invoked by uid 3782); 21 Jun 2023 21:25:41 +0200 Received: from acm.muc.de (pd953aea6.dip0.t-ipconnect.de [217.83.174.166]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 21 Jun 2023 21:25:41 +0200 Received: (qmail 14244 invoked by uid 1000); 21 Jun 2023 19:25:41 -0000 Date: Wed, 21 Jun 2023 19:25:41 +0000 To: Po Lu , Joseph Garvin Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ Message-ID: References: <87edm52fu1.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87edm52fu1.fsf@yahoo.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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, Joseph and Po. On Wed, Jun 21, 2023 at 19:51:50 +0800, Po Lu wrote: > Joseph Garvin writes: > > Start emacs with `emacs -Q`, press C-x C-f and type in a filename that > > ends in .cpp like "foo.cpp". Then type in: > > int main() > > { > > int a = 0; > > int b = 0; > > int $ = 0; > > int d$ = 0; > > int $e = 0; > > } > > Yes it compiles! GCC, Clang, and MSVC all have a non-standard > > extension that allows $ signs to appear in C/C++ variable and type > > names: https://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html > > Then a,b,d$ will be highlighted correctly as local vars, but not $ or > > $e. The highlighting doesn't appear to work whenever $ is the first or > > only character. Since emacs is accepting of the $ sign anywhere else in > > the variable name, I suspect supporting $ was intended, even though it's > > non-standard. Even if not intended, it's a popular syntax > > extension supported by the major current compilers and whose history > > goes back to the DEC compiler, so support would be nice. > This is a bug indeed. Alan, would you please look into this? OK, I've amended C Mode, C++ Mode and Objective C Mode to fontify identifiers starting with a $. Please apply the patch below to .../lisp/progmodes/cc-langs.el, and (since Lisp macros have been changed) recompile the entire CC Mode files and reload them. (Joseph, if you want any help with the patching or compiling, feel free to send me private email.) Then please try out the new version on your real code, and confirm to me that the bug has been fixed, or tell me what's still wrong. Thanks! diff -r c45cc2208ed4 cc-langs.el --- a/cc-langs.el Wed Jun 21 14:58:04 2023 +0000 +++ b/cc-langs.el Wed Jun 21 19:14:40 2023 +0000 @@ -819,8 +819,9 @@ keyword. It's unspecified how far it matches. Does not contain a \\| operator at the top level." t (concat "[" c-alpha "_]") + (c c++) (concat "[" c-alpha "_$]") java (concat "[" c-alpha "_@]") - objc (concat "[" c-alpha "@]") + objc (concat "[" c-alpha "@$]") pike (concat "[" c-alpha "_`]")) (c-lang-defvar c-symbol-start (c-lang-const c-symbol-start)) @@ -844,9 +845,10 @@ t (concat (c-lang-const c-symbol-start) "[" (c-lang-const c-symbol-chars) "]\\{,1000\\}") pike (concat - ;; Use the value from C here since the operator backquote is + ;; Use the value from AWK here since the operator backquote is ;; covered by the other alternative. - (c-lang-const c-symbol-key c) + (c-lang-const c-symbol-key awk + ) "\\|" (c-make-keywords-re nil (c-lang-const c-overloadable-operators)))) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 17:06:46 2023 Received: (at 64204) by debbugs.gnu.org; 21 Jun 2023 21:06:46 +0000 Received: from localhost ([127.0.0.1]:34304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC52M-0003S8-Bw for submit@debbugs.gnu.org; Wed, 21 Jun 2023 17:06:46 -0400 Received: from mx3.muc.de ([193.149.48.5]:36778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qC52L-0003Rv-0q for 64204@debbugs.gnu.org; Wed, 21 Jun 2023 17:06:45 -0400 Received: (qmail 5444 invoked by uid 3782); 21 Jun 2023 23:06:37 +0200 Received: from acm.muc.de (pd953aea6.dip0.t-ipconnect.de [217.83.174.166]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 21 Jun 2023 23:06:37 +0200 Received: (qmail 15079 invoked by uid 1000); 21 Jun 2023 21:06:37 -0000 Date: Wed, 21 Jun 2023 21:06:37 +0000 To: Po Lu Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ Message-ID: References: <87edm52fu1.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WSR0cPEg5Vb5sk+9" Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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 (-) --WSR0cPEg5Vb5sk+9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Po. Apologies, the patch I sent earlier was defective, not applying cleanly to the Emacs master branch. I also should have sent the patch as an attachment. I'm now sending the patch as attachment. It should apply cleanly to the master branch or emacs-29. On Wed, Jun 21, 2023 at 19:25:41 +0000, Alan Mackenzie wrote: > On Wed, Jun 21, 2023 at 19:51:50 +0800, Po Lu wrote: > > Joseph Garvin writes: [ .... ] > OK, I've amended C Mode, C++ Mode and Objective C Mode to fontify > identifiers starting with a $. > Please apply the patch below to .../lisp/progmodes/cc-langs.el, and > (since Lisp macros have been changed) recompile the entire CC Mode files > and reload them. (Joseph, if you want any help with the patching or > compiling, feel free to send me private email.) Then please try out the > new version on your real code, and confirm to me that the bug has been > fixed, or tell me what's still wrong. > Thanks! [ .... ] -- Alan Mackenzie (Nuremberg, Germany). --WSR0cPEg5Vb5sk+9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20230621b.diff" diff -r c45cc2208ed4 cc-langs.el --- a/cc-langs.el Wed Jun 21 14:58:04 2023 +0000 +++ b/cc-langs.el Wed Jun 21 19:14:40 2023 +0000 @@ -819,8 +819,9 @@ keyword. It's unspecified how far it matches. Does not contain a \\| operator at the top level." t (concat "[" c-alpha "_]") + (c c++) (concat "[" c-alpha "_$]") java (concat "[" c-alpha "_@]") - objc (concat "[" c-alpha "_@]") + objc (concat "[" c-alpha "_@$]") pike (concat "[" c-alpha "_`]")) (c-lang-defvar c-symbol-start (c-lang-const c-symbol-start)) @@ -844,9 +845,10 @@ t (concat (c-lang-const c-symbol-start) "[" (c-lang-const c-symbol-chars) "]\\{,1000\\}") pike (concat - ;; Use the value from C here since the operator backquote is + ;; Use the value from AWK here since the operator backquote is ;; covered by the other alternative. - (c-lang-const c-symbol-key c) + (c-lang-const c-symbol-key awk + ) "\\|" (c-make-keywords-re nil (c-lang-const c-overloadable-operators)))) --WSR0cPEg5Vb5sk+9-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 00:50:46 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 04:50:46 +0000 Received: from localhost ([127.0.0.1]:34545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCCHO-0007g3-4N for submit@debbugs.gnu.org; Thu, 22 Jun 2023 00:50:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCCHL-0007fj-I3 for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 00:50:44 -0400 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 1qCCHF-00046u-KW; Thu, 22 Jun 2023 00:50:37 -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=Rdo0uKAqd8J/ZmYlsTZAK5PnjW2qOJgUlBvZo2ZEPHk=; b=l3ttFU9TwNvj TXn4iDgwZ35dITITqfASNKlaJB+IdmgBb3QPvr+672iS5PwAgZBz8s8u0ZDowObrPaL9h1MZnC4vK M4Bw9fJApOH8KybfmAb0xf3LbZZ2/HWWOwXCV95de+442m+8NwBNmuUi1VWP5xpKFM840z84HJFVp 6CKdbXWa8fHyw2RgTuFfXLpflqXjQIobq6e+S6LuodfCfFDM2LUDpv9trI9OBeCoXU23LEDisv0Ee WBT6I7AquKgYeX1Awkqyi58sdbSeYK9mdNIWx+95w41PEEWL4jqpxvZPYdCQasmyAhRnuatJ3VO8y ntQk24hq+l4KCZ/a4S0nxQ==; 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 1qCCHE-0003yv-Uw; Thu, 22 Jun 2023 00:50:37 -0400 Date: Thu, 22 Jun 2023 07:50:47 +0300 Message-Id: <83cz1o3xso.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Wed, 21 Jun 2023 21:06:37 +0000) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: luangruo@yahoo.com, acm@muc.de, 64204@debbugs.gnu.org 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 (---) > Cc: acm@muc.de, 64204@debbugs.gnu.org > Date: Wed, 21 Jun 2023 21:06:37 +0000 > From: Alan Mackenzie > > Apologies, the patch I sent earlier was defective, not applying cleanly > to the Emacs master branch. I also should have sent the patch as an > attachment. > > I'm now sending the patch as attachment. It should apply cleanly to the > master branch or emacs-29. 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 01:44:50 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 05:44:50 +0000 Received: from localhost ([127.0.0.1]:34609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCD7i-0003uP-37 for submit@debbugs.gnu.org; Thu, 22 Jun 2023 01:44:50 -0400 Received: from sonic315-22.consmr.mail.ne1.yahoo.com ([66.163.190.148]:40330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCD7f-0003u6-Kk for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 01:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687412681; bh=lCLqfp5ItUyP4FaGKWx/C3Y3nwH/Gc4k7ZVwQUMHRkg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Ft0y7+lRt3g4PRO6EvA5VLV0v9y74xyXn0odgPQdGhlJtAmO9PjaUsZnnpQK9IffVLpCgmeCr8EUtcNHKSnSueku5HEl2raK3bmRlr2rQ1mMU8EKwwg6y5+SngBrZ8D0KgmI5hmlko9L9eAz1TO/8HKT1PWKpdbstRFA8mAzC0ca5L5Xw2dMwz7N5CRbd1I5O11zsP2R8Uat32DNR39s3aGDnmGqchBiRv3l5xK/5uxeoEbdjcmfOEUKy9wUDMPP2Rq5tjGDuCm3R+vnF/3SIAAfpLVysGcOMFQMoQ5Q9IiDO9Kw/QfcEzNV53Ft6aUMdzp5sfFt+KqMUYnoS0vnpg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687412681; bh=ItXvj6trNKlzvNMIl7D7sjPC7bKdHydKH4xBP0mS6f/=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=MA++QrcU8TMf6x9JJ294SwgO+gqNd0IE/Wx4HXXP8TWHiZYY3KpDQS/6BjzlEOjPuoAUrvG7mVTcHBnCO6KwxjnqOakKNBFiaVEgqXH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0KiVcDV_eSMNMNndv2RQEggo2Cl6BrixQE1A.e.AH.TYrFh_gM7_4ICGMPhp Pyp2co4xx4NqQa5PuPe6_FLCePKEFsj0yYlWJbDyWmREmP0B3v0fIZmHQ3C76KpkxF0N8559UNkH Ei5epI8ZGQf4zZ2mRUwe5bkbxy2pcPMMVfM1w1J1yCjHDYGzd3nirYXzkOxbSKVoqbaK.kllI8Iy z42pyZDKbSmyYNuFizkJ1r0UjlvTA0HHNQI2sU7VrUtsu61qNWNC_0QfT8scawkrxzHzgQtbnAlk nfa2u0QPx2BfV8ACljaAW9zBBd4jy8Xmp9FGTGZb66mMo1uCjxDtzgMnvuELqdp46Zam0qfmkrRP Ow4aP1PU_gPgyDU17SyMnoLa2jduli6D3U2L31PkrQYIBf7V8YbnXYOBAmaEYyOPh X-Sonic-MF: X-Sonic-ID: e4196795-a64b-4e42-8ca2-aeabc2521a55 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Jun 2023 05:44:41 +0000 Received: by hermes--production-sg3-748897c457-gjhr4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 733b50f9569830a7ac4e9cf6a19efff4; Thu, 22 Jun 2023 05:44:35 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: <83cz1o3xso.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 07:50:47 +0300") References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> Date: Thu, 22 Jun 2023 13:44:29 +0800 Message-ID: <87legc126a.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 388 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: Alan Mackenzie , 64204@debbugs.gnu.org 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 (-) Eli Zaretskii writes: > 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. There is no other use for the character $, so this is not necessary: it's either an identifier or a syntax error, and we don't try to fontify syntax errors. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 01:57:37 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 05:57:37 +0000 Received: from localhost ([127.0.0.1]:34622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCDK5-0004Sy-Fk for submit@debbugs.gnu.org; Thu, 22 Jun 2023 01:57:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCDK3-0004Sh-W0 for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 01:57:36 -0400 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 1qCDJx-0005gn-Ut; Thu, 22 Jun 2023 01:57:29 -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=M0A4XpeJh5v8i/CoJLz2HnVEK1+COA2emkK9W++dm4M=; b=DmSSwF4BPGf3 +Y3i0IERSj8aNpbkwQDqCfjLvNwyim0hNAPHqJiFEW+uqCWuRq070AeFstFLzOBGP7dzuSug6u5IH gP7HOFCJ6d8/2B5j47pK1RKo3FBIh8/5yB6C5QVUB3CrDNJARUoFlpanTQ0kuM/3Hbd4A8qGOauST Nc+4Z0Qe/22kXxPLMcNrZCCciwtgjMor0AymQEpZoxEaUO1nL0lWlIZa2EXVmZueTMmkBiTwAP5ak AL+GPAieduwUozq8/FyacgGelpjW9gP25JQYgxxcgvk3/0Am1yXHsUyln0PEkw1K1WBtNcOFCD7Vl UrZE/ptI/W6DXdZbusQoYw==; 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 1qCDJw-0002sV-6L; Thu, 22 Jun 2023 01:57:29 -0400 Date: Thu, 22 Jun 2023 08:57:38 +0300 Message-Id: <837crw3up9.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87legc126a.fsf@yahoo.com> (message from Po Lu on Thu, 22 Jun 2023 13:44:29 +0800) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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: Po Lu > Cc: Alan Mackenzie , 64204@debbugs.gnu.org > Date: Thu, 22 Jun 2023 13:44:29 +0800 > > Eli Zaretskii writes: > > > 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. > > There is no other use for the character $, so this is not necessary: > it's either an identifier or a syntax error, and we don't try to fontify > syntax errors. Sorry, I disagree, for the reasons I explained above. (I don't mind this feature to be ON by default, though.) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 02:18:57 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 06:18:57 +0000 Received: from localhost ([127.0.0.1]:34652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCDej-00059u-2J for submit@debbugs.gnu.org; Thu, 22 Jun 2023 02:18:57 -0400 Received: from sonic313-10.consmr.mail.ne1.yahoo.com ([66.163.185.33]:42396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCDeh-00059c-98 for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 02:18:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687414729; bh=p9X7BQV1gipJppAUGmEu6k4+Uax/0VithWXHkfIttmQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Fb1dZmqsvoOcmMXsI3wClVZIY4s+mcfRCGghirWGjvrBXENb27SU1ib0mFSMyfIgU2p2o/pWmhZ4IQAx+wcwQakKQ/iw1Y99W7Ah1slGBDQI83toeBcyFyXNtSAbZSZ78ag0vBUtdrQZ3kJMdao8SrOKs9bBmcP2Zj7oEVCOYEdXo/CXY96FzWohewAO/KqOtmXXqiJomGLLP73IC4nx0xgRD6NEhj2LHGoO9CZd/eHlp8MPxTQIRCmLhR3lvRvK1z83xa0A5BJR8EPaMMt8S32QVniVwxEA/sfVfJRTV8uot8RP3AEZ5UkcjmjNx07HdGtIm8DSfLO4Osri2b/sTQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687414729; bh=QNVhOiGmfHAloDeC+wkcVMFDNUP43nQmhLrfTBCXzdN=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Jhsn43mI6bxPg+0cAABEpUf3pLX+WVA7knXSINHgu0F4RuZdXFDz5fLSKEXxnWsHpaESPIgGr0BdF5OnQ1vJpYYA3rV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V9Qq1qRCew_sIzVNo5gO9WaRXGdCEjG77AasJBLc1.1HRXPbIFWWld.K6jXZmqR2JW3N MnFmM3IM3Z6EZeLoo.z0kzgP.6jN1RgucavlGuw_ySGTbF8gB9X9.PH1KNwNIMXWm1DTIEERxuru PQKgblSkWJjoCXPdP2oHo9NUO3qvh5SfaGVnetwGycNjpoUI7tYX2BQXjssx6EtqQKnNQNLB35Pi AYrBEMLjYosXRlkne3ItjpqwY72YVc1uSRW3s8qWH57O8RpngMOyW9cQ14tSLHhy7_pI__.SxCPN PSYMF71JREKbdeYs6A7D2OGIMdqhVINVZ1bxpZ1BNUGAHABb7C53SCIh83yNV0qADjwBI1GLyEfr 5vG3dXgnChEcIyAGZlMpUbWl8xWJmuWPv.fUUyIVQPBbeLt5epcHreBu1uYk9584j_EM- X-Sonic-MF: X-Sonic-ID: 96c171c0-0bf9-4b99-a342-25d382376d2c Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Jun 2023 06:18:49 +0000 Received: by hermes--production-sg3-748897c457-rqcgt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 738378e2ffd4794011c5fc96eca72724; Thu, 22 Jun 2023 06:18:43 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: <837crw3up9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 08:57:38 +0300") References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> Date: Thu, 22 Jun 2023 14:18:37 +0800 Message-ID: <87h6r010le.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 823 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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 (-) Eli Zaretskii writes: > Sorry, I disagree, for the reasons I explained above. (I don't mind > this feature to be ON by default, though.) Previously, this syntax (_only_ the syntax where an identifier starts with $; CC Mode has always supported identifiers containing $, which are also non-standard) would not be fontified at all, or would be fontified randomly. Why would that be desirable, and how would it help anyone follow the Standard? My objection to adding unnecessary options to CC Mode is because, for some reason, these options end up requiring counter-intuitive steps to modify, and slow down CC Mode by a tiny (but not negligible) amount. For an example, see c-noise-macro-names or c-font-lock-extra-types, both of which can only be set as file-local variables or before C Mode is enabled. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 02:54:59 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 06:54:59 +0000 Received: from localhost ([127.0.0.1]:34684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCEDa-00068t-SQ for submit@debbugs.gnu.org; Thu, 22 Jun 2023 02:54:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCEDY-00068f-Ha for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 02:54:57 -0400 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 1qCEDS-0007fT-TM; Thu, 22 Jun 2023 02:54:50 -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=tqSnjvQMf5w78Jmu71++8kv6kyvdAKUnuF62AF0lws8=; b=azkha8dLJ9oz Sl4KeCrH23tExgl9x7v8OqU46Rhf/NwpqeH84x9wLYzga3HBqks4lW/AZwk+hYBmjmq/XnQ0r6qrp eiyT1q7Z11dMz8q7MJSmv+HemJZ81tDbVp7UMeXx6ErxPfkAly6/q0vvBYxplZDct5GyhEqlOgmpU ErbkrvGWZsm+Rnyvst2nqIRuyAjV0zz7uNtL6kf7xE3zISh1CmYiEaDTKsyzmcrxAMW0BAqmgfrUv CidhHqKDqDOHowL1mQn+5vfXjzjwdKgQFg79Z9Lm5ty145G8fqMIRmx4YVZIHnZCaZo9CzXI+gyAD gs2iXhfvuB1RSZv1u+etfw==; 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 1qCEDS-0001Jr-B1; Thu, 22 Jun 2023 02:54:50 -0400 Date: Thu, 22 Jun 2023 09:55:00 +0300 Message-Id: <834jn03s1n.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87h6r010le.fsf@yahoo.com> (message from Po Lu on Thu, 22 Jun 2023 14:18:37 +0800) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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: Po Lu > Cc: acm@muc.de, 64204@debbugs.gnu.org > Date: Thu, 22 Jun 2023 14:18:37 +0800 > > Eli Zaretskii writes: > > > Sorry, I disagree, for the reasons I explained above. (I don't mind > > this feature to be ON by default, though.) > > Previously, this syntax (_only_ the syntax where an identifier starts > with $; CC Mode has always supported identifiers containing $, which are > also non-standard) would not be fontified at all, or would be fontified > randomly. Why would that be desirable, and how would it help anyone > follow the Standard? All the uses of '$' in identifiers should be controlled by that option. > My objection to adding unnecessary options to CC Mode is because, for > some reason, these options end up requiring counter-intuitive steps to > modify, and slow down CC Mode by a tiny (but not negligible) amount. I disagree that this option is unnecessary. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 03:15:50 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 07:15:50 +0000 Received: from localhost ([127.0.0.1]:34717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCEXm-0006gE-GL for submit@debbugs.gnu.org; Thu, 22 Jun 2023 03:15:50 -0400 Received: from sonic313-10.consmr.mail.ne1.yahoo.com ([66.163.185.33]:39622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCEXk-0006fz-CD for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 03:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687418143; bh=FdTQruhpaITtFzxxHyyJgEAzTQy+SElnwXRMsf2iNlo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=jaT74RW/wA8O127EfzFFbDLrRA30O06+55FwmXZJvCHnpI9BUPNmt2KlPinaYw0WMF/yDNf7EMuggxSHx6icrULK4ZWjVWShRDlKzYYlQ8e8UOUflOjEUdGjZB4MZKVeIRi377MJd0fQtzzq9I0eLFpdsfLw3A/gHvaCg3hJdDW8jkM0qjadyYNmDzIZKaG11itRW+S1BXPkfItAsvX7bxzaUbOUiShML9stD+R/x7ZB+TdhO/H73hQ00e9xniiF/s+8Jh/0zYIlMtronDbdvqXIm0ZAjE1/wJlnFC5wvQ55ylvWexSFkuTTkJ+bGFM3Vb1ABtizuKUHOqqiyoUTiA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687418143; bh=d2nQM0USW1ZR9VtDJVbCz9+rcg9KqMiJUMa9Ih5DgHW=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=M9L1OY/BummF2Dwj4nN4WYFHwIGJFZg78Zart+jW7f/fiKKcqiAIC6LnQ9dEw5lGd74zNKt9zuvRyjFfqJnfC2Bng53yXAkoJbGm/QitCLlrPqzKcR4m3WlGsJn500XcbYwbpsw7TE1utJRZauDk3P8wIa0GObetIXB7eSUrGu9zElc2TNuMrhjIMznu2FpWaCxN/DcBA1+q9ETtwizDhmGbxEmLikkM3tPUKmArj7AB1gpz0+er8yg9S00Ir96u2zzcXlTwgB+NEb0MjxoMhpquLz0KR5GYFjP8uBhi/EuRwiO8Jjllu5fyMlRdEUzBoeOAQnLxShgqxVD4cW/B7g== X-YMail-OSG: UEZvR6wVM1kKO2C5H.PYoSIvyeOshP.EVpnT_vgYMcByZTyAueosT..D8q6ncht IYxm4f.25OYdOOxOAWwKSChNjqwg5b8nPkFwOgN2Jp8stkNayhHlevmXvqEGL0njYt__F4GHvHRs pOLe0xOhQd4w5uSHoWQNzy3m7vDQ9oUPeLZkqKOG.kDweGjFVDNl2MXJSv3WN14oiHRQv3HlHVA2 UC9gWfa3H0XIrxVwfLbfB6UNQMpwuepKSm1jz1lz4Aj2L7hYqLnaoZ2hnVV.SgJX.fr8Sf_4Vtry ZxNJD901eT8KifZUBgP1QtzoXzb9JvDjvdNP4P14iZcQVzJ04a_sBGWvAmp1qB513ieKniIkx5.r 9bFrfJgb6xexG58J7rxy6w2bmvWTlymsAMf5.QrNljcReL_o87pE1jUrpo5O4ovrBECfSrJFYMsh 9XUWs1M7oay0qPeXCybGZrPxrCV9iZl.F0Grt3a3YFrny9k40RMJpGoCkn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cj3z07SW1cepBG1MlDDhfB_Ey3V4m tumlFF57_Dp9CX075hP6SNjAuHntNqF3gnULqx8xMRikMyrsS_VNPs7LLS8SnKWyv8tilv5RTBJF H14y9Gr0BKHmvN3QBF25MwpDJalZYTswZUOVYfDNCGChc5SN20iLpU70thBf4HxlrnaOv8y6LaTg Fd8.FmGOEW722XOR9UztLxsyvoDfr8Ivdm_beFBQFZ6uP97UDxkK_M7bxLd4MCyR7z.VqrmswMCE lWqhcD4gb7YgYUaaAiQ0VhsrC5Uv73EBPMvQ6dd1ucPy4UPsTBipyTlDlHVkbn9UV2m7H.Bq2Dev SRzDqx.kO5bk5TX0akcglDQrd.fwr0jPAdIOp0bQ1CBz593EQ_pMcS7vV0pNpl8gQoI_hcor590Y 4Hv9fSJbt37BgJravN54TyT3AQ.234msQnFtz5X95pM.Yfa9G.AdwsCpf0BtQvJiaGoo0YWA0Z54 m7iEZA2O_HMWf8FrgKRrWNP4G4_94QaIjbXoYxVN2aqB.j3n_r8yCYIrN.4njaqgKk2.o3zcQi0O osqSiSEEblwCkI29gDiGrCaCExXHbK5KtqM58br.uBeKxCM9fwcQJRFZ8PLvCLYEn_SW8_dIfCYR jLf0f142_tHXt2cOH8.id2qTzC5waL0Pm.Qsop8b4KuMB3AwgQH32ZeHmttlxvS9ijk2lwM5_Sa9 V5knWXPVvmIJDdfqKFqD5za.ErDGfxHcPjHv4ePc4kyLfuM3jD1XqVEPRHNq5ozcbYFnc X-Sonic-MF: X-Sonic-ID: c0481c92-aac6-4c8a-9316-d6a3892bb0e5 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Jun 2023 07:15:43 +0000 Received: by hermes--production-sg3-748897c457-fnrhv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9159cbce7e9dc155911f088278cdb115; Thu, 22 Jun 2023 07:15:40 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: <834jn03s1n.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 09:55:00 +0300") References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> <834jn03s1n.fsf@gnu.org> Date: Thu, 22 Jun 2023 15:15:34 +0800 Message-ID: <87cz1o0xyh.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 232 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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 (-) Eli Zaretskii writes: > All the uses of '$' in identifiers should be controlled by that > option. CC Mode doesn't make use of identifiers containing $. No syntax features are affected, I think, only fontification. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 05:11:49 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 09:11:49 +0000 Received: from localhost ([127.0.0.1]:34801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCGM0-0001Fs-Cl for submit@debbugs.gnu.org; Thu, 22 Jun 2023 05:11:48 -0400 Received: from mx3.muc.de ([193.149.48.5]:58206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCGLx-0001FZ-N8 for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 05:11:46 -0400 Received: (qmail 84768 invoked by uid 3782); 22 Jun 2023 11:11:39 +0200 Received: from acm.muc.de (p4fe157eb.dip0.t-ipconnect.de [79.225.87.235]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 22 Jun 2023 11:11:39 +0200 Received: (qmail 14201 invoked by uid 1000); 22 Jun 2023 09:11:38 -0000 Date: Thu, 22 Jun 2023 09:11:38 +0000 To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ Message-ID: References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83cz1o3xso.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: luangruo@yahoo.com, 64204@debbugs.gnu.org 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, Eli. On Thu, Jun 22, 2023 at 07:50:47 +0300, Eli Zaretskii wrote: > > Cc: acm@muc.de, 64204@debbugs.gnu.org > > Date: Wed, 21 Jun 2023 21:06:37 +0000 > > From: Alan Mackenzie > > Apologies, the patch I sent earlier was defective, not applying cleanly > > to the Emacs master branch. I also should have sent the patch as an > > attachment. > > I'm now sending the patch as attachment. It should apply cleanly to the > > master branch or emacs-29. > 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 don't think people are going to be putting $ signs at the start of identifiers by accident. CC Mode has always fontified $s in the middle (or at the end) of identifiers, and this doesn't seem to have caused problems. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 06:07:01 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 10:07:01 +0000 Received: from localhost ([127.0.0.1]:34911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCHDR-0002ps-C4 for submit@debbugs.gnu.org; Thu, 22 Jun 2023 06:07:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCHDP-0002pf-E1 for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 06:07:00 -0400 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 1qCHDJ-0006Cy-Hm; Thu, 22 Jun 2023 06:06:53 -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=QPz4XpMJhmurSZP7/tHlUgi5cMDByQ3V31z/I5VAiZU=; b=O7O2IHguCPTr AtHzXnx7pl9e/nfDlPorIbDQtoHPh9h0abhv+OlWQvrY63nUMk14hiCHFATX5nonrcZaIgeFmx8nK Bs8A67tNi1w0RUG+IfA/w0EGHU0uupFiJ9j17JkE3MQLKCiWbxZt8OULknRyff/XK/9gOCb+1gKqi 6REQZMFYUN1bHu3EGyxfn3jVz0/Lfv1+aqAAjd2JFRXA+fNrlTraJb0kreaeMnt9aEeYyo+3okD7F ICk3syk00Q5KG50lg659HFppAeDwNEgQ1UokkWKUQXXVi+f8FRCFmuMG8y5BOyjBAOqYteT0xRQ9t bgcUM0q22khXY6wZOoWD6g==; 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 1qCHDI-0005ub-3L; Thu, 22 Jun 2023 06:06:53 -0400 Date: Thu, 22 Jun 2023 13:07:02 +0300 Message-Id: <83352j4xq1.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87cz1o0xyh.fsf@yahoo.com> (message from Po Lu on Thu, 22 Jun 2023 15:15:34 +0800) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> <834jn03s1n.fsf@gnu.org> <87cz1o0xyh.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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: Po Lu > Cc: acm@muc.de, 64204@debbugs.gnu.org > Date: Thu, 22 Jun 2023 15:15:34 +0800 > > Eli Zaretskii writes: > > > All the uses of '$' in identifiers should be controlled by that > > option. > > CC Mode doesn't make use of identifiers containing $. No syntax > features are affected, I think, only fontification. I _am_ talking about fontifications. One of the main purposes of fontifying code is to give the programmer feedback regarding the syntax and semantics of the code. Flagging invalid syntax is therefore important, and when $ are invalid in identifiers, showing that with fontifications is important. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 06:13:55 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 10:13:56 +0000 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 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 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==; 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 Date: Thu, 22 Jun 2023 13:13:59 +0300 Message-Id: <83wmzv3iu0.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Thu, 22 Jun 2023 09:11:38 +0000) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: luangruo@yahoo.com, 64204@debbugs.gnu.org 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: 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 07:46:58 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 11:46:58 +0000 Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCIm9-0008AH-Mx for submit@debbugs.gnu.org; Thu, 22 Jun 2023 07:46:57 -0400 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:33373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCIm8-0008A2-FB for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 07:46:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687434411; bh=cISquAnSnVEVvgFhsDYKb049ai+Fa6OyG+bAY/92/m8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ZHBZCAmPJtfRvqIw8/L8gUKcLUYRlNf7ON/0wo+dsD7ztdYyWPjEtnNcuLRjyVul9NJoNwQj07SP+NRd8WNDQkMex7wC++skRTAzr0NQ2y4brQTT7oPIjeTxzieox3M6G8Na4Z+SAt4OB1R31/R3V/iYhUfUbltlxIXKUAEojQtRDivZcIDet00RprOyu59ZuxsDzwsMgXDZgQKD3Oiv0PlVoiS/RTmwcFvdJ9SHxLn/9Pyot47k/b3YPxjzb1+HHPu2QrKMDW+XIKxpE/lP6X4TAxEZoP7XQpUPvSwJuJu0g8f44qYHDx41fRbS0Aj8nAF/BMfQFgIdZZC5ngc7FA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687434411; bh=JGK1lYoqQQjSvfBduRkv9FVl+14hn5rZl+6qoXTMdwN=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HqoABOoxIVYyXL67uIPX68NuV7zJ62nX9La/rMdn33mFGPUlTakdWab5lzYUZoN0Q6i9EgNfVicOFrnuT6wHmWu9yHuZZ0qRRafurnWKoFYH0SfQ4v2aIYhfARnOUGiYPVkIf+viO1ACpvBN5Vn+Vt+aUGagoZK5H2asMBHYTXK6V43B7sulZv73oQNtVkdzF4gnvKLSlRkxT79QwRg8V3fzDeNR+CcYR7f2Bs7ZWdGeXVA4N/QM4c9oX6WSlEKNJfdCL4jmjPzpZ1YKi9TBoQnVXYwGHQW6kc9Ma6XaRXAgXU5AqpPx30Dr1gYu7i5lMuRo89N8NjTV3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ag KkzdXbgSFPKYYwD5Q7ayv0zBABJVgNrzInVtfVRZh_bqJAiot1aFZL8JhR7cFHYPf7OWPiH6fmby i20BVriCQHQR8CgHqnGgxdg8je.KGT3AFd30xTPWAHxjMoX7ZwQGl_EirdRD_xbbPBLuJYZ0ikyT x8zLdtXWnAVqV2H1yUUL_msKBRFoytz0a8OmNw28AnJMYN6fljIUo.kKYLc1cWIGR6OvUIDo- X-Sonic-MF: X-Sonic-ID: a0582927-3548-4742-9ff8-31e2da2989fe Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Jun 2023 11:46:51 +0000 Received: by hermes--production-sg3-748897c457-gjhr4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 218b8708723bafc6069069bfeb65689f; Thu, 22 Jun 2023 11:46:46 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: <83352j4xq1.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 13:07:02 +0300") References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> <834jn03s1n.fsf@gnu.org> <87cz1o0xyh.fsf@yahoo.com> <83352j4xq1.fsf@gnu.org> Date: Thu, 22 Jun 2023 19:46:41 +0800 Message-ID: <87zg4rzplq.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 685 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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 (-) Eli Zaretskii writes: > I _am_ talking about fontifications. One of the main purposes of > fontifying code is to give the programmer feedback regarding the > syntax and semantics of the code. Flagging invalid syntax is > therefore important, and when $ are invalid in identifiers, showing > that with fontifications is important. But CC Mode fontification has never been intended to flag invalid syntax: instead of not being fontified at all, invalid syntax is simply fontified every which way. This is not a problem one option can solve; it will require large scale redesign of CC Mode, and detecting invalid syntax is more the forte of c-ts-mode anyway. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 07:59:58 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 11:59:58 +0000 Received: from localhost ([127.0.0.1]:35086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCIyj-0000Af-RI for submit@debbugs.gnu.org; Thu, 22 Jun 2023 07:59:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCIyi-0000AP-BO for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 07:59:57 -0400 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 1qCIyc-0002xM-AW; Thu, 22 Jun 2023 07:59:50 -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=B0AjcFnH7pY8v43Y+X2sIXrv5xIfWviHAJG5k0fHm4k=; b=RGPUGhGFnlSv W3QwrqQDtuPjLsaF4gZyK9FPu7/fNk+loiSdrrm6RzYesfLg6a7au+R53V3ObJ1YRqLl40lrYR+Xw 08pgzxukQ4bE0GEzYRTe+V6BT8jCUZ35KIdtpkCkYO7ILQ1yQzLBI+PioXrJe5Wi6vgx7L64Lbjjd KmWeFjmmQC3+Ix4hy+4g2MbsUOhbPG+SIEFfqzWMj4sU22Dy1ShSiDkM+61Djjczgq305B+/wdKRb oaC1mYCtzqZJVQLFbiJbbw0BBah1P/1AB8ohOCorPRW4xXZ8WuaemksBHA/FTm0ch7I5j3G7Jjanp no5aB42UYOgnuza9497kyg==; 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 1qCIyb-0003jD-QO; Thu, 22 Jun 2023 07:59:50 -0400 Date: Thu, 22 Jun 2023 15:00:00 +0300 Message-Id: <83ttuz3dxb.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87zg4rzplq.fsf@yahoo.com> (message from Po Lu on Thu, 22 Jun 2023 19:46:41 +0800) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> <834jn03s1n.fsf@gnu.org> <87cz1o0xyh.fsf@yahoo.com> <83352j4xq1.fsf@gnu.org> <87zg4rzplq.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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: Po Lu > Cc: acm@muc.de, 64204@debbugs.gnu.org > Date: Thu, 22 Jun 2023 19:46:41 +0800 > > Eli Zaretskii writes: > > > I _am_ talking about fontifications. One of the main purposes of > > fontifying code is to give the programmer feedback regarding the > > syntax and semantics of the code. Flagging invalid syntax is > > therefore important, and when $ are invalid in identifiers, showing > > that with fontifications is important. > > But CC Mode fontification has never been intended to flag invalid > syntax: instead of not being fontified at all, invalid syntax is simply > fontified every which way. It is fontified the way the syntax is interpreted, which is exactly what I'm talking about. > This is not a problem one option can solve; it will require large > scale redesign of CC Mode, and detecting invalid syntax is more the > forte of c-ts-mode anyway. No redesign is needed. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 08:33:23 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 12:33:23 +0000 Received: from localhost ([127.0.0.1]:35120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCJV4-0000zz-W5 for submit@debbugs.gnu.org; Thu, 22 Jun 2023 08:33:23 -0400 Received: from mx3.muc.de ([193.149.48.5]:64898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCJV2-0000zk-KM for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 08:33:21 -0400 Received: (qmail 58582 invoked by uid 3782); 22 Jun 2023 14:33:14 +0200 Received: from acm.muc.de (p4fe157eb.dip0.t-ipconnect.de [79.225.87.235]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 22 Jun 2023 14:33:13 +0200 Received: (qmail 17322 invoked by uid 1000); 22 Jun 2023 12:33:13 -0000 Date: Thu, 22 Jun 2023 12:33:13 +0000 To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ Message-ID: References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <83wmzv3iu0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83wmzv3iu0.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: luangruo@yahoo.com, 64204@debbugs.gnu.org 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, Eli. On Thu, Jun 22, 2023 at 13:13:59 +0300, Eli Zaretskii wrote: > > 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. Having thought about this some more, maybe it's not such a big problem. The strategy I'm thinking about would not attempt to analyse identifiers with $ in them. Instead, it would amend only the fontification, with a new ad-hoc entry in font-lock-keywords which would go over all identifiers at the end of the fontification, and splat those containing a $ with font-lock-warning-face. I can see more problems arising when people start wanting to use identifiers with random Unicode characters in them. :-( -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 09:21:16 2023 Received: (at 64204) by debbugs.gnu.org; 22 Jun 2023 13:21:16 +0000 Received: from localhost ([127.0.0.1]:35144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCKFQ-0002IN-Aw for submit@debbugs.gnu.org; Thu, 22 Jun 2023 09:21:16 -0400 Received: from sonic313-56.consmr.mail.ne1.yahoo.com ([66.163.185.31]:36848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCKFO-0002I7-SS for 64204@debbugs.gnu.org; Thu, 22 Jun 2023 09:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687440069; bh=h3WHMYzkJc7T/x6GAhm+b9+9VTCOJbCL/kuEWaxQZG8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=njjLsGUq2YjWff7PxKMT2ZP3ZNJGRv0maLFDVs3aPXladse6Bf47lfnGzrdIUdeC+2cUhlXPkfafsZZXDSfjPNtaRnQ23aRPs/IZ8kGezF110GZBIsfGCT1UZKq5o6XKM6v62D5yhEYIkX8fWNPNLNDm3Mq8v1hCtat4LOG08+fCl/HxjjWLvhZ+HRfnX635V2B1p+Xue6ly48C3thlBXQyjd+4c5wHDpSez+9nGwLeEUleeigepDTFyWGr13rdxtKbG17JSVTqM+Mpp0xWC/wPJDSYsVWhy2uBBUPe1oJ57I32mOeWJZsqjZukfAAtypTl7w2WRRqdHNXEHGc1/5Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687440069; bh=tvKxJHEMaLdz+nPfzRS1a4tNqzlvu3how+uzgXYW9Dl=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=PkstAlStFraIex/1OEfxhX5HzsSo51PBPv3tasgSMyMiWPOEijIhM/IhajpJDjc7vV8IL7Vjy12vq1+FRPUnn7YYH0G/cJnqoyaeCH33gB0+wI0AIsxyqHya8zN6Uh8DH1Rjd7moKLNpXmaXclj72SXj6BMkxf/CbnV4PzV+A55X2zTP+Rm6qhYNdNEu+2Fq60vjBrMeG0h+JtwS1x7lc+hZZSOb02I7wGw4e8Q9jVmuYJknCeU67LiXo/PwiMfBCyoSw36YE/z0xsz97HsDcgIEB23f5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THThonDSpEHNiBRqASW2eTMNHUD29Fr41xcCTIsJw5v7kvWYOx HImBLp9r6xMTecxM40F95TJaKUoHXEDBtVt16aIn_6gpmoKW_5LZCYgkUbFkuGWAWTAHMnJZ7dLH QLbrhvJRZcUNoSA5hDmEEP84lgCUhpjfIiT.XyWAwUqxP6xxb7AspMvOott7U72kPxYEOfLKVRgn hDHwTDylCgSE2KG._pU2Jd7VLal2LDe.b4Re0HlrczE3_VG8zD5ddWNFdCszPGce.Dmhs X-Sonic-MF: X-Sonic-ID: 8c556005-cb39-44a7-a444-427d0aadbf3d Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Jun 2023 13:21:09 +0000 Received: by hermes--production-sg3-748897c457-fnrhv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 027631ff315cc9d8405e4c44ff1de3c5; Thu, 22 Jun 2023 13:21:03 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ In-Reply-To: <83ttuz3dxb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jun 2023 15:00:00 +0300") References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <87legc126a.fsf@yahoo.com> <837crw3up9.fsf@gnu.org> <87h6r010le.fsf@yahoo.com> <834jn03s1n.fsf@gnu.org> <87cz1o0xyh.fsf@yahoo.com> <83352j4xq1.fsf@gnu.org> <87zg4rzplq.fsf@yahoo.com> <83ttuz3dxb.fsf@gnu.org> Date: Thu, 22 Jun 2023 21:20:58 +0800 Message-ID: <87r0q3zl8l.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 329 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204 Cc: acm@muc.de, 64204@debbugs.gnu.org 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 (-) Eli Zaretskii writes: > It is fontified the way the syntax is interpreted, which is exactly > what I'm talking about. The problem is that: int $lsp; is not interpreted as an ``error'', just as some syntax that cannot be fontified. CC Mode is not in any position to determine whether or not syntax is valid. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 28 14:45:19 2023 Received: (at 64204-done) by debbugs.gnu.org; 28 Jun 2023 18:45:19 +0000 Received: from localhost ([127.0.0.1]:51706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEaAI-0004Lo-NT for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:45:19 -0400 Received: from mx3.muc.de ([193.149.48.5]:53969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEaAH-0004Lc-01 for 64204-done@debbugs.gnu.org; Wed, 28 Jun 2023 14:45:17 -0400 Received: (qmail 6247 invoked by uid 3782); 28 Jun 2023 20:45:11 +0200 Received: from acm.muc.de (p4fe155d3.dip0.t-ipconnect.de [79.225.85.211]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Jun 2023 20:45:10 +0200 Received: (qmail 18856 invoked by uid 1000); 28 Jun 2023 18:45:09 -0000 Date: Wed, 28 Jun 2023 18:45:09 +0000 To: Eli Zaretskii , Joseph Garvin Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ Message-ID: References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <83wmzv3iu0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83wmzv3iu0.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64204-done Cc: luangruo@yahoo.com, acm@muc.de, 64204-done@debbugs.gnu.org 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, Joseph and Eli. On Thu, Jun 22, 2023 at 13:13:59 +0300, Eli Zaretskii wrote: > > 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. :-) OK, the fontification of identifiers with $ is now working. By default they are fontified as normal identifiers (i.e. with font-lock-type-face, font-lock-variable-name-face, or font-lock-function-name-face), but if the (new) customisable option c-warn-ids-with-dollar is set to non-nil, font-lock-warning-face is used instead. The above applies only to C, C++, and Objective C Modes, and to any derived modes which enable the mechanism. So, I'm closing the bug now with this post. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 28 14:50:39 2023 Received: (at 64204-done) by debbugs.gnu.org; 28 Jun 2023 18:50:40 +0000 Received: from localhost ([127.0.0.1]:51715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEaFT-0004Yy-HD for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:50:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEaFR-0004Yl-4x for 64204-done@debbugs.gnu.org; Wed, 28 Jun 2023 14:50:38 -0400 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 1qEaFL-00061y-OG; Wed, 28 Jun 2023 14:50:31 -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=bkyAKzWKvwzUIOAt5mvuCjb5OUCkzL+MdWINmdhNPoM=; b=TFqukrxpeIjv iRoOsco2cyUQDNRybY7r9mTD5VAh/3i9bd9+2FGpCOTI4JV5C8Ico/iyN9F7iJSuHIH3Ia2+pAZNZ yEfD4rSSJU3GGCtS/GywktVsfjYieds3LkLLH9VQwnu+MuvAcK65Py82N8UR4i9JOLKt8d5JUQtcx MHjkJhD0CZ84gRumypjAlgngdJvClzpMc7jMsYWfdjzUUaTwjOK113xdIrb5/b3R3Emx3kc2Gzrg4 QugKodHpb2KKRW8boOUuYU/45rkIWbAg93ATtQUc8CNjuuMsHMHKZE3jrl4q5xyFUgUautVOUWZjJ 38uanyX7e+5Jl8N+BATslQ==; 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 1qEaFH-0005Zk-AZ; Wed, 28 Jun 2023 14:50:30 -0400 Date: Wed, 28 Jun 2023 21:50:51 +0300 Message-Id: <83y1k3to8k.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Wed, 28 Jun 2023 18:45:09 +0000) Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <83wmzv3iu0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64204-done Cc: luangruo@yahoo.com, acm@muc.de, 64204-done@debbugs.gnu.org, k04jg02@gmail.com 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: Wed, 28 Jun 2023 18:45:09 +0000 > Cc: luangruo@yahoo.com, 64204-done@debbugs.gnu.org, acm@muc.de > From: Alan Mackenzie > > > 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. > > :-) OK, the fontification of identifiers with $ is now working. By > default they are fontified as normal identifiers (i.e. with > font-lock-type-face, font-lock-variable-name-face, or > font-lock-function-name-face), but if the (new) customisable option > c-warn-ids-with-dollar is set to non-nil, font-lock-warning-face is used > instead. The above applies only to C, C++, and Objective C Modes, and to > any derived modes which enable the mechanism. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 29 02:43:30 2023 Received: (at 64204-done) by debbugs.gnu.org; 29 Jun 2023 06:43:30 +0000 Received: from localhost ([127.0.0.1]:52135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qElNJ-0005tZ-Ey for submit@debbugs.gnu.org; Thu, 29 Jun 2023 02:43:30 -0400 Received: from mail-pj1-f46.google.com ([209.85.216.46]:59585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEeRV-0008JV-GK for 64204-done@debbugs.gnu.org; Wed, 28 Jun 2023 19:19:34 -0400 Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-262e839647eso66802a91.2 for <64204-done@debbugs.gnu.org>; Wed, 28 Jun 2023 16:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687994355; x=1690586355; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CtqrWYSqXfkG6+FJyoFzJmVo+Mz9gnL5xVI1YOjLQL0=; b=kMyaDnW2MlznOhzNqLO/T3clWh7gAidOhojO9ouothKamNlA/cJLfIFJRG/h9ZQ0a+ pRRts4Mh8CKVmU2kmdi3X5vbRchO51n1IxuCtT56fP8Oj5CcARhHTVfBxSZGZ1MV9h9A 340wB0Rkf5/wxkIUBCtbhj25V6i/XEtIrYEptZCssQuXsumt/neJkytTGJXn9RGTwMAT yHum/OZN08xoFjSCFROzVEx7VelcbFyC+qi4Ib+PS9JQ8m8qncMiBWCkKMVvwtTlfQer gaz7H7qmrvVOieZwRXSPmCQuS9YoFuU5AtjldP4Tt8odK+0Bsaw+4fdk3OTrrATlPn4J xAxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687994355; x=1690586355; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CtqrWYSqXfkG6+FJyoFzJmVo+Mz9gnL5xVI1YOjLQL0=; b=MUSXCj3UsKU1q1uPRTBuFJtNmp1DpDe8NS5mXfwE/L1DS1kgSP+Uwp4hlt61awzFTQ 4j5RDF0ymOR+nIZMgr2Y5+M24svEPIvZ8Jf6IaBb3e/lsrMQ0ZzjfgBzM6AOtBzcGBoi 2Y9SDnH+OfZVlKlzT5mQRhFRsPQW2rbkIJLvP+qd46hSve7K31779ZFP5XdUYc41s6Ei B3ykLha8qXpa8fJ7oyniHDn1U3rzikYdeUnon/PuGiyx3FYjr9pPhdEvd3QPi64KSLY6 V6ahtMsB4GPYpRmi9qLfrxBEM8lUZKUBpbMryfMNjhfBmjXy0rSR+rLV3WddELrBE7jZ QLLg== X-Gm-Message-State: AC+VfDwGmhHecyxf2riPU3VUjxoL9AhOWam266zxMPzm8CJoQzZ7Ddg9 u63PPtMStsI9rA4R7QqqdEtXgVhcV/WAho2dm3o= X-Google-Smtp-Source: ACHHUZ7LcCy4G8ySgColB0O0wlifXUgpundESGdKVKTN6aL9sXMppTwSi0pQSKNDIrcA/rEkZM5fYDPTQzuJzNF/wRQ= X-Received: by 2002:a17:90a:11:b0:262:ff9e:b07e with SMTP id 17-20020a17090a001100b00262ff9eb07emr8889621pja.8.1687994355435; Wed, 28 Jun 2023 16:19:15 -0700 (PDT) MIME-Version: 1.0 References: <87edm52fu1.fsf@yahoo.com> <83cz1o3xso.fsf@gnu.org> <83wmzv3iu0.fsf@gnu.org> <83y1k3to8k.fsf@gnu.org> In-Reply-To: <83y1k3to8k.fsf@gnu.org> From: Joseph Garvin Date: Wed, 28 Jun 2023 18:19:06 -0500 Message-ID: Subject: Re: bug#64204: C/C++ local variables not syntax highlighted if they start with $ To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000f04c9305ff38cf0f" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Thanks, appreciate the work! On Wed, Jun 28, 2023, 1:50 PM Eli Zaretskii wrote: > > Date: Wed, 28 Jun 2023 18:45:09 +0000 > > Cc: luangruo@yahoo.com, 64204-done@debbugs.gnu.org, acm@muc.de > > From: Alan Mackenzie > > > > > I do feel it's worth the effort. If we value correct f [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (k04jg02[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (k04jg02[at]gmail.com) 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.46 listed in wl.mailspike.net] 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.216.46 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 64204-done X-Mailman-Approved-At: Thu, 29 Jun 2023 02:43:27 -0400 Cc: luangruo@yahoo.com, Alan Mackenzie , 64204-done@debbugs.gnu.org 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: -0.7 (/) --000000000000f04c9305ff38cf0f Content-Type: text/plain; charset="UTF-8" Thanks, appreciate the work! On Wed, Jun 28, 2023, 1:50 PM Eli Zaretskii wrote: > > Date: Wed, 28 Jun 2023 18:45:09 +0000 > > Cc: luangruo@yahoo.com, 64204-done@debbugs.gnu.org, acm@muc.de > > From: Alan Mackenzie > > > > > 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. > > > > :-) OK, the fontification of identifiers with $ is now working. By > > default they are fontified as normal identifiers (i.e. with > > font-lock-type-face, font-lock-variable-name-face, or > > font-lock-function-name-face), but if the (new) customisable option > > c-warn-ids-with-dollar is set to non-nil, font-lock-warning-face is used > > instead. The above applies only to C, C++, and Objective C Modes, and to > > any derived modes which enable the mechanism. > > Thanks! > --000000000000f04c9305ff38cf0f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, appreciate the work!

On Wed, Jun 28, 2023, 1:50 PM= Eli Zaretskii <eliz@gnu.org> wro= te:
> Date: Wed, 28 Jun 2023 18:= 45:09 +0000
> Cc: luangruo@yahoo.com, 64204-done@debbugs.gnu.org, acm@muc.de=
> From: Alan Mackenzie <acm@muc.de>
>
> > I do feel it's worth the effort.=C2=A0 If we value correct fo= ntification,
> > of course.=C2=A0 I don't know what my opinions on this mean f= or you, but
> > there you have it.=C2=A0 I cannot force you make this change, of = course, I
> > can only try to convince.
>
> :-)=C2=A0 OK, the fontification of identifiers with $ is now working.= =C2=A0 By
> default they are fontified as normal identifiers (i.e. with
> font-lock-type-face, font-lock-variable-name-face, or
> font-lock-function-name-face), but if the (new) customisable option > c-warn-ids-with-dollar is set to non-nil, font-lock-warning-face is us= ed
> instead.=C2=A0 The above applies only to C, C++, and Objective C Modes= , and to
> any derived modes which enable the mechanism.

Thanks!
--000000000000f04c9305ff38cf0f-- From unknown Sun Jun 22 00:55:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 27 Jul 2023 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator