From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63840: 29.0.91; c-ts-mode fails to fontify common C extension Date: Fri, 02 Jun 2023 20:11:33 +0800 Message-ID: <87fs7anjwq.fsf@yahoo.com> References: <87fs7anjwq.fsf.ref@yahoo.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20473"; mail-complaints-to="usenet@ciao.gmane.io" To: 63840@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 02 14:12:17 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 1q53dg-0005Db-JH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Jun 2023 14:12:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q53dT-0003rf-28; Fri, 02 Jun 2023 08:12: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 1q53dS-0003rV-Bq for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 08:12: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 1q53dS-0004i3-28 for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 08:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q53dR-0002Aj-TB for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 08:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Jun 2023 12:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63840 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16857079118328 (code B ref -1); Fri, 02 Jun 2023 12:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jun 2023 12:11:51 +0000 Original-Received: from localhost ([127.0.0.1]:39247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q53dG-0002AG-K2 for submit@debbugs.gnu.org; Fri, 02 Jun 2023 08:11:50 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q53dF-00028k-5O for submit@debbugs.gnu.org; Fri, 02 Jun 2023 08:11:49 -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 1q53dE-0003qU-VJ for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 08:11:48 -0400 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q53dC-0004gZ-RK for bug-gnu-emacs@gnu.org; Fri, 02 Jun 2023 08:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685707903; bh=d+xJMd2nJ9pKpGBT832S90CdYYOT+8v/r9BZTwPTL/w=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=C1BmcEGwcwdaFrBR9JebFzYKLoLS7AONx25UYIT3nk8rIPW5vbd7a1gFRZK3y+JmtvtAiebI/05BVIZfyx04efpZf/3FXamlCWSel5ttHIYpdZG567dgcqNyZVssI4G8V9R9JBo6V5dEnlyrWowssJkmhdFy5mF/9BjCYl3z247dXk+wbDzVH+0dI+rLzeM1lZIsTp4vqKKVlCrRTF8j4iLdLSxmgWR3x/e9Gx/XsyvLcuwV2YG5FE4VVznTnTJP6WLPr91MpkwUCYD6UQwmFQzNSu9NFA2B85YA8atDAiC1NbnsXSnG7GnQAwNfY7CpKcpx9enOcS2bHEBgwv5rDQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1685707903; bh=6HMS4OE5ipZeITqD3oYD+WuDLiyaJp4Ls+nVMSSgyeP=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=iphpPp3tfVG8ikQtXiGHwqp+ETMqEdecoQlOv41EOjw2nwLdrzOuWfufknu+4CuPTnqUKjVphEpQuJoD8NxAMXCoGsZLM9+sy8Cd3dC9fraiGMBrqVfre4vC63btevJCkSyvccio+MlZwGjN6ydvObf2s0Gsd2ZIaG2C3ttSJtdT8hEK0Ecf/NpexwuzM/oIikOWCWFuigm9dmldFDRe9bD/LQb61JjDZGjHIyDKUqaRSlzV3bgwVQ9LSD+vN9m/v6vfxpH9UtJ8dGHW0XDwKZLrz5AayeJlgX7lXV5gay7Oc0s85JihK4y3lcthA4bgJmN6wwjKA4ddgScPysbFZw== X-YMail-OSG: BpyPNe0VM1nNyLHooTfeR.ZVt7wTrMwm67HmSgwaSyN5m6nKiN7P1wZr.Ihxxzy Fl9nmuMA2rZa__LctGp_s_7COSxkXoQei.5SX7X9o8ujue6cU.Ud.46VMtFWSxTvkMgI6m_FJkPW T16nUridpHQ9lUTI9ufZhkcYVIQn_YTEuNAIloVFwS280oJi80y4_QoxNRB13Vmwll4dat6Gv8_h nAPPQYZ0Prv3Ir48cqxGvhdzZnXyXWbLG.r3v3qYzz9RtD2mu8m9.L.fdMh8JFhp6oHEeRSWcBHZ xJcxg6tnqg7lPYLaFW4kqsNU0skKHaLFKBasvbq5t3d3tP.3.Ee7DEMPTFAPLQ9tf7qwWKNsTkJ1 .6G7CNBALzEFfNdeVIyMq7qSsDfflJMQMNIDqXSz2qd2WSU9Q.Jox7Do5eIiLjpmxbRO66BjUuc2 aB4SE8.SKeXZVIK7LjRL_2oRHVWpbsnGGPw.PWAYDaTAdKE.dAIzQpM96hbzwX300L8shA.esga. Ji_dZEFQl0oX_ZAhcKZrQ36vFfDD3kUBQs0p5dmQFo1yc6EhpeJgqj9zUhgz.TgUz55WyjnJVeh. x30p9KZKwmnIieu7g35hzI9acxWl8H8jpwppN_XnrIjb6fNtJn7NR0iZjnbq0Rwj6vS5EbcSqfHH OmbGpit3UVkrJhV3P2_wgbHj40uG9nj7TtwlHNJ3_3rT1xBSbqHemse8NJDXdZ0FojhKv843HLQo FAj0O9T27QOhHo5_ObZ5BUrnMWOCJpNa5QYH8pG8.b979EG4sMBXePyiHccazg2n94pulFXgYQnB sJ60T3uLt5JceGt6C8rwXIbOtnFXRo5AvpDXxFSmo4 X-Sonic-MF: X-Sonic-ID: d49f4a38-227e-41dc-943e-8d61e226053f Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 2 Jun 2023 12:11:43 +0000 Original-Received: by hermes--production-sg3-748897c457-ppt9c (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID bc9389eb49334fa7c677318ab7bcb098; Fri, 02 Jun 2023 12:11:39 +0000 (UTC) X-Mailer: WebService/1.1.21495 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.consmr.mail.ne1.yahoo.com 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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-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:262756 Archived-At: A common extension to the C language is the use of the `$' sign inside external identifier names. This is permitted by GNU CC on most systems it supports, and also supported by CC Mode. However, it does not work on c-ts-mode: sl$loadarena () { struct FAB fab; register int status; extern char *sl$dfname; fab = cc$rms_fab; fab.fab$b_fac = FAB$M_BIO | FAB$M_GET; fab.fab$l_fna = sl$dfname; fab.fab$b_fns = strlen (sl$dfname); status = sys$open (&fab); if (status != RMS$_NORMAL) return status; /* More code below. */ } in the identifier name of this function declarator, `sl' is fontified as a type. `$' is not fontified at all. `loadarena' is fontified as an identifier name, as it should be. In: extern char *sl$defname; only `dfname' is fontified as a variable name; in CC Mode, all fontification is correct. This should be a simple change in c-ts-mode's identifier fontifying regexp to include `$', right? I don't know enough about tree-sitter to fix it myself. Thanks.