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: Thu, 27 Apr 2023 18:03:28 +0300 Message-ID: <83jzxxs6yn.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> 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="11625"; 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 Thu Apr 27 17:04:45 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 1ps3Ar-0002m8-HC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Apr 2023 17:04:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ps3AQ-0005R1-Le; Thu, 27 Apr 2023 11:04:18 -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 1ps3AB-0005Ah-Id for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 11:04:07 -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 1ps3AA-0003Mf-Qh for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 11:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ps3AA-0000Xz-KW for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 11:04: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, 27 Apr 2023 15:04: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.16826077872003 (code B ref 62951); Thu, 27 Apr 2023 15:04:02 +0000 Original-Received: (at 62951) by debbugs.gnu.org; 27 Apr 2023 15:03:07 +0000 Original-Received: from localhost ([127.0.0.1]:59550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps39G-0000WF-QD for submit@debbugs.gnu.org; Thu, 27 Apr 2023 11:03:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps39E-0000Vj-6D for 62951@debbugs.gnu.org; Thu, 27 Apr 2023 11:03:05 -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 1ps398-0002vn-Ub; Thu, 27 Apr 2023 11:02:58 -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=Vdx8hEYVtNp4Vf48AFlaNgNluPasm53TyAuYJJX6D2U=; b=P4V8tnpbQt2TPLxSmWCL UKQMSqJQC6eBlpU9351VgqHzlDDajInuz/DiQD1SSQox423Ak1ldCZBfc6ib9enhJtwRxo2qDjNPV 7kye0hHrpJ8kJkircJ9z0wsjmk/l6z2M+m7C4x6V3BeIW5/zHiB38hQ8AkB5liSo4cpGf/FrOXf1B VvhKx+Ja3rDLBtvBs7lnp/tf+W9lZhyP15kVLkE0rhE+YTbC8ddHu0CosbeWH8txQ7Yo0jNY9f8NO N4d2ZBG6jBy6/GTuc3GSny5AAwR+rAaZrRC/5bpEN3srN2B53OwwThX+ZP3FxXK6Eth8oPlTxPxBf bGI89/7bBuLthg==; 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 1ps395-00028K-U7; Thu, 27 Apr 2023 11:02:57 -0400 In-Reply-To: <36F36D54-E56C-42C8-B686-448C8BF938EA@gmail.com> (message from Yuan Fu on Wed, 26 Apr 2023 20:14:45 -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:260724 Archived-At: > From: Yuan Fu > Date: Wed, 26 Apr 2023 20:14:45 -0700 > Cc: Eli Zaretskii , > 62951@debbugs.gnu.org > > Ok, here’s the patch. Eli, would you give it a try? It signals an error when I enable c-ts-mode: 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. 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 . FOR_EACH_LIVE_BUFFER (data.c, line 1430) is not recognized? . FOR_EACH_FRAME (keyboard.c, line 1256) is not recognized? 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). Thanks!