From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Newsgroups: gmane.emacs.bugs Subject: bug#74507: [PATCH] Indent compounds c-ts-mode when { is not BOL Date: Sat, 30 Nov 2024 21:49:47 +0100 Message-ID: References: <87r071yov3.fsf@lambda.is> <86serabhgw.fsf@gnu.org> <1e4fcc9a-4f69-4c3a-b9d6-716d61129e31@lambda.is> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2244"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , theo@thornhill.no, 74507@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 21:50:26 2024 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 1tHUQ5-0000R0-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 21:50:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHUPl-0003JH-AD; Sat, 30 Nov 2024 15:50:05 -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 1tHUPj-0003Ip-4c for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 15:50:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHUPi-0005vd-Ig for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 15:50:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=00jDMESGlWBE69G8FyhZcZB8kKYrbu2TW/gQzSuUstI=; b=gSLgmFIR62upl2PsbBbnivG0Qnz/RDwPWxqW3UCj3fK8VCoSOwh0Vx4rtV8Im7iTOFM4cb0skD1KIXWrdUUYqdAHaVLnwiM9Vx4nIEIVpf6fr314Wpia4po/oMUbha9b/JAN1XU4kzFY23bxwQ1ZIT+FKaxvyJc6qO2CGr85ClID2YL4FQPe09i5WbaERavTkpgew0MCWXOvLxVU9KXU3Oc9yBDz6oZONZEcXMW2NfMfxx9T0mD8VPWP9d3bNFA1rRxcGb9157qgRY3V6pUmQZnAX7H62hz4LSixlNNguSQf+ldtsFQpyPEdVthciiDLyca7vlS6hbwe2azsYnEQyg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHUPi-0000D5-Ds for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 15:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74507-submit@debbugs.gnu.org id=B74507.1732999798789 (code B ref 74507); Sat, 30 Nov 2024 20:50:02 +0000 Original-Received: (at 74507) by debbugs.gnu.org; 30 Nov 2024 20:49:58 +0000 Original-Received: from localhost ([127.0.0.1]:49276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHUPe-0000Cf-5i for submit@debbugs.gnu.org; Sat, 30 Nov 2024 15:49:58 -0500 Original-Received: from mx.kolabnow.com ([212.103.80.154]:41604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHUPc-0000CI-BZ for 74507@debbugs.gnu.org; Sat, 30 Nov 2024 15:49:57 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 299EC30BDF0E; Sat, 30 Nov 2024 21:49:50 +0100 (CET) Authentication-Results: ext-mx-out013.mykolab.com (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :mime-version:date:date:message-id:received:received:received; s=dkim20240523; t=1732999789; x=1734814190; bh=00jDMESGlWBE69G8 FyhZcZB8kKYrbu2TW/gQzSuUstI=; b=or9n1hhI3OS2aDW5Un0MR8vEV2Gul0xY wqPDlGk3Vsx7eAYN6ZsUdNiFafSl5VXtnGfRQtzx7GCPRq7xzVXwfAKSrGBch8Uq omCc+q4rUCzk4BtpjiqIuYeRjH7pIYxCzTsJoMa6xMAyYmnP2AzVhwPqaoDWb22t c7UYekGodVr5k3RlZiA/g1tmE2MpsqcnKIvpqV3Az9bjadxlq+7K1C+GOmdAkCF4 0p8VR8mj5AYM19ucDo3+Dx1CRlqglF3E6rUKN1Xs0msCOUx6cgw+AIrQLrGLDF72 XfVOq/Pal9CBCEvlX7OwWlisUnLze33AsrpQRByFLukpLmVf5KxS1A== X-Virus-Scanned: amavis at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out013.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id nYAXm9BV3YJF; Sat, 30 Nov 2024 21:49:49 +0100 (CET) Original-Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 2134F308C22E; Sat, 30 Nov 2024 21:49:48 +0100 (CET) Original-Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id EF25F239611D; Sat, 30 Nov 2024 21:49:47 +0100 (CET) Content-Language: en-US In-Reply-To: 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:296211 Archived-At: On 11/30/24 01:16, Yuan Fu wrote: > > >> On Nov 29, 2024, at 1:05 AM, Jørgen Kvalsvik wrote: >> >> On 11/29/24 08:57, Eli Zaretskii wrote: >>>> Cc: theo@thornhill.no,casouri@gmail.com >>>> From: Jørgen Kvalsvik >>>> Date: Sun, 24 Nov 2024 10:15:12 +0100 >>>> >>>> * lisp/progmodes/c-ts-mode.el (c-ts-mode--parent-is-not-top-compound): >>>> New function. >>>> (c-ts-mode--indent-styles): Use it. >>>> * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New compound >>>> statement test. >>> Please make sure the lines here are not too long (see CONTRIBUTE for >>> details). >>>> +(defun c-ts-mode--parent-is-not-top-compound (_n parent &rest _) >>>> + "Matches when PARENT is not the top level compound statement, >>>> +the {} that immediately follows the signature." >>> The first line of a doc string should be a single complete sentence. >>> Thanks. >> >> Ok. Yuan, would you like me to submit a revision? > > Since your assignment is already done, let’s just apply your patch, and I’ll rebase my changes on top of yours. So yeah, do send the revision patch, thanks! > > Yuan Certainly - I posted it on the bug tracker. Thanks, Jørgen