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#62951: 29.0.90; c-ts-mode: Incorrect fontification due to FOR_EACH_TAIL_SAFE Date: Fri, 28 Apr 2023 08:41:53 +0300 Message-ID: <838recsgv2.fsf@gnu.org> References: <82E7ADEC-25BC-475B-8EE0-839FE78FF2F4@gmail.com> <83fs8s2xnk.fsf@gnu.org> <2BDA88D0-A870-4FE3-BAF8-350FBAA943BF@gmail.com> <384f8110-eba6-8fb3-ef4e-56fa0721d85d@gutov.dev> <90E66143-A3E2-4B76-AC0A-01DC5E841AFE@gmail.com> <36F36D54-E56C-42C8-B686-448C8BF938EA@gmail.com> <83jzxxs6yn.fsf@gnu.org> <85A2194C-5C67-4AC2-A265-9C20F03FA5B6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15827"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 62951@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 28 07:42:22 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 1psGs9-0003vp-FT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Apr 2023 07:42:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psGrt-0003vI-30; Fri, 28 Apr 2023 01:42:05 -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 1psGrq-0003v1-Tu for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2023 01:42:03 -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 1psGrq-0001Jx-L1 for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2023 01:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1psGrq-0006C3-EJ for bug-gnu-emacs@gnu.org; Fri, 28 Apr 2023 01:42: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: Fri, 28 Apr 2023 05:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62951 X-GNU-PR-Package: emacs Original-Received: via spool by 62951-submit@debbugs.gnu.org id=B62951.168266049023765 (code B ref 62951); Fri, 28 Apr 2023 05:42:02 +0000 Original-Received: (at 62951) by debbugs.gnu.org; 28 Apr 2023 05:41:30 +0000 Original-Received: from localhost ([127.0.0.1]:60241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psGrJ-0006BF-HR for submit@debbugs.gnu.org; Fri, 28 Apr 2023 01:41:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1psGrG-0006B1-4C for 62951@debbugs.gnu.org; Fri, 28 Apr 2023 01:41:28 -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 1psGrA-0001IE-Nb; Fri, 28 Apr 2023 01:41:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=cIMaIuil4W64HoCDA1TXB84ZHEJYvP36xCYmt5LxD+4=; b=nTm86ER6fhbbKspr8g+z grjYWoF01Tr/kUeJpCd7i6NwhlEuW9PaD2dYutZSXVXJ4zM3uHvjKe7uGaSWPCSdQc29JH1PWUe2W WxKriSTGD1Lo4kuwjYBAwKBEyUw8Metj1BwOrjEK/hAtZDp233XC2z1yOSQ/Nd7MTHFNNX3UyOOo7 xcTi+6ro7fgrbrYQxhdYWLjjDOxzxMb1R86bK9mK5g9uCkZq3Hs8huWi3dpP6lNWm0pPfy591nG9t kLXIzS7tLQgLgxFLRtnvaReSpyFOqaiUBs1urdYizaB4u25k2LQDwmaWKGt2LNFbhkRzHMMJI7ryG dAntPI+1yAJfcg==; 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 1psGr9-0004bj-JH; Fri, 28 Apr 2023 01:41:19 -0400 In-Reply-To: <85A2194C-5C67-4AC2-A265-9C20F03FA5B6@gmail.com> (message from Yuan Fu on Thu, 27 Apr 2023 12:56:07 -0700) 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:260749 Archived-At: > From: Yuan Fu > Date: Thu, 27 Apr 2023 12:56:07 -0700 > Cc: dmitry@gutov.dev, > 62951@debbugs.gnu.org > > > c-ts-mode: Cannot load language definition: not-found, ("libtree-sitter-emacs-c" "libtree-sitter-emacs-c.dll"), "No such file or directory" > > > > It looks like your "fake emacs-c language" trick somehow misfires? > > The value of treesit-load-name-override-list is nil, which is not what > > you intended, AFAICT? The only way I can make this work is by > > manually customizing treesit-load-name-override-list before loading > > c-ts-mode. > > Duh, sorry, dumb mistake. Fixed. Thanks. > > Otherwise, looks quite good; here are some other problems I found: > > > > . some uses of FOR_EACH_TAIL are not fontified at all; examples: > > comp.c, line 2079, fns.c, line 189 > > You mean the FOE_EACH_TAIL part isn’t fontified, or the body isn’t fontified? Because the body are always fontified here. FOR_EACH_TAIL itself shouldn’t be fontified since it’s just a macro call and a variable. I mean the macro itself, FOR_EACH_TAIL. If it isn't supposed to be fontified, then why is it fontified at line 856 of comp.c? It's inconsistent. (However, this is a very minor problem, so if fixing it is difficult, we can leave this alone for now.) > > . FOR_EACH_LIVE_BUFFER (data.c, line 1430) is not recognized? > > . FOR_EACH_FRAME (keyboard.c, line 1256) is not recognized? > > Didn’t know that they exited :-) Now I have FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE, FOR_EACH_ALIST_VALUE, FOR_EACH_LIVE_BUFFER, FOR_EACH_FRAME. Great, thanks. > > This is much better than before already, so I think you should install > > this on the emacs-29 branch, once you fix the above problems (assuming > > they are easily fixable). > > Cool, I pushed the change. Thanks.