From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: master 63d69bd1549 07/11: Use new baseline indent rule in c-ts-mode Date: Mon, 02 Dec 2024 16:02:33 -0500 Message-ID: References: <173310542049.252624.8341603519407599366@vcs3.savannah.gnu.org> <20241202021023.2C8B8521785@vcs3.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2432"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuan Fu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 02 22:03:43 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tIDa3-0000UN-8C for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Dec 2024 22:03:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIDZC-0002U5-6M; Mon, 02 Dec 2024 16:02:50 -0500 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 1tIDZ8-0002Tk-Ft for emacs-devel@gnu.org; Mon, 02 Dec 2024 16:02:46 -0500 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 1tIDZ0-0003Ru-In; Mon, 02 Dec 2024 16:02:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=3PYRfxl9Y95ljH8f1AziQqWNAOH6O34ZHjQPG+mMUBU=; b=meQ8SIH5kht8DmazJ2DO 2E0dG6cxfoO5DEuGN8SzMTJ5czG4AT7RMie6rFGWBfZ2TZ4uXB9hrGJhNR3QZa+FmklEZElARlBzz jsJ7Oc4xbtZH1vd4y1gpTo3Lez2A+0JCwi6fL3/C8HKVR1T2PzHwh2uQq5FKwiwnaR1xQ4Qk4eGaA 8SJzxRhjOJsX7bmPV/mCv7EWxiQIrS2h6PuFcASArJmY5uoUhKSzvHNHo99SLuPKOxUBuM/Xj7GWf R8PqzGVdKoatWKzndnNTKEFZlffYGDw4yXio+stnI1rbO73m8I9bDtJ2M4ijZ/FMyj0kp4H9V0FtQ ZYWQjUD1b8aTog==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tIDYv-0005hE-T3; Mon, 02 Dec 2024 16:02:37 -0500 In-Reply-To: <20241202021023.2C8B8521785@vcs3.savannah.gnu.org> (Yuan Fu's message of "Sun, 1 Dec 2024 21:10:23 -0500 (EST)") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325954 Archived-At: Yuan Fu writes: > branch: master > commit 63d69bd154987bcc0434e0f85e09bf5dfa07b827 > Author: Yuan Fu > Commit: Yuan Fu > > Use new baseline indent rule in c-ts-mode > > Rework the indent rules in c-ts-mode using > c-ts-common-baseline-indent-rule. Also reworked internal > functions for setting indent styles to make it simpler and (more > importantly) more readable. Now there's a single function, > c-ts-mode--simple-indent-rules, that returns a value that can go > straight to treesit-simple-indent-rules. > > * lisp/progmodes/c-ts-mode.el: > (c-ts-mode--indent-style-setter): Simplify. > (c-ts-mode--get-indent-style): Remove function. > (c-ts-mode--prompt-for-style): Use a hard-coded list of styles. > This is a tiny downgrade from the computed lists but is > acceptable. > (c-ts-mode-set-style): Use c-ts-mode--simple-indent-rules. > (c-ts-mode--standalone-grandparent): Docstring change. > (c-ts-mode--for-loop-indent-rule): New function. > (c-ts-mode--preproc-indent-rules): New variable. Copied from > old indent rules and added some new rule. > (c-ts-mode--macro-heuristic-rules): > (c-ts-mode--simple-indent-rules): > (c-ts-mode--parenthesized-expression-indent-rule): > (c-ts-mode--label-indent-rules): New functions. > (c-ts-mode): > (c++-ts-mode): Use c-ts-mode--simple-indent-rules. > --- Hi Yuan, this commit on my test-bench seems to introduce on master the following two failures: c-ts-mode-test-indentation-bsd, c-ts-mode-test-indentation. Could you have a look? Andrea