From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#74507: [PATCH] Indent compounds c-ts-mode when { is not BOL Date: Sun, 1 Dec 2024 01:25:53 -0800 Message-ID: <60820855-5672-4083-B7B5-38FF5259BBF4@gmail.com> References: <87r071yov3.fsf@lambda.is> <86serabhgw.fsf@gnu.org> <1e4fcc9a-4f69-4c3a-b9d6-716d61129e31@lambda.is> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26355"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , theo@thornhill.no, 74507@debbugs.gnu.org To: =?UTF-8?Q?J=C3=B8rgen?= Kvalsvik Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 01 10:28:19 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 1tHgFX-0006fn-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Dec 2024 10:28:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHgFK-0008IA-Fx; Sun, 01 Dec 2024 04:28:06 -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 1tHgFI-0008Hi-09 for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 04:28:04 -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 1tHgFH-0000Nj-N2 for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 04:28:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:Date:In-Reply-To:From:Mime-Version:To:Subject; bh=YhVcq18xXaiXrxaGAxTQ8rrN2vBvjLpzHZ1IStLRCKA=; b=YMmzQSaAtjSd2NUaUJmdQ27ajuu1eeG6NQkRV+Vmut0lqw1W+R9mPjHdZm8CQ1cavLbFBNbIYtVsieIzx0/T72wzTADLxU5HxpJifjqJS4lgoS5WV9B8w/9gSE5ZlxXSP/9EOtz0akrfWwcocJS/HPGzgK1+Rr1b3pdL3DTrhgiM/InGYDdFcwQ8fx7G5/jbS+YJcnQFK5sBtZ1yJUBLeut8UAxQtABeAWszhmsSOiCKyl5SWJePF4JhjZyKyH2vVRc3RMVP8Vb6EtmImcggzOmNaoy4LfJ+6evI2ynZ3g9BvNzGzCQBTxfMMfWZrXQbaVeZXquHXC+dZYSsQBw55w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHgFG-0005cs-7e for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2024 04:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2024 09:28: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.173304523421537 (code B ref 74507); Sun, 01 Dec 2024 09:28:02 +0000 Original-Received: (at 74507) by debbugs.gnu.org; 1 Dec 2024 09:27:14 +0000 Original-Received: from localhost ([127.0.0.1]:50291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHgET-0005bJ-Nw for submit@debbugs.gnu.org; Sun, 01 Dec 2024 04:27:14 -0500 Original-Received: from mail-pg1-f181.google.com ([209.85.215.181]:49155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHgES-0005az-2l for 74507@debbugs.gnu.org; Sun, 01 Dec 2024 04:27:12 -0500 Original-Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7fbd70f79f2so3105622a12.2 for <74507@debbugs.gnu.org>; Sun, 01 Dec 2024 01:27:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733045166; x=1733649966; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YhVcq18xXaiXrxaGAxTQ8rrN2vBvjLpzHZ1IStLRCKA=; b=ZksxEIuB0aAVKIJknyYdUjrpRjB61V8F30k52/Kr/HNI0hrR5ThuhymqficK0FucUe MjSruHKRiYLNxjtNoUO/IHKxwFEnOlGaq4jNUknbCLTR0H7UjEjWjGMA5ZXJnoiYIAOc xPFzgOrbbSbgEuVX6r0w4Lm68gJgnu0XRv9dvrCfxNVf2oUgXY7MRbFwKmauoB2zcvOw TXIQSs32EUTv6056nY3cJJYRVJTgafdK5WVBLP7GcWOk3kWYaeexDRpy1dslmGwCRBNk UnIH/jF9H0NcPweDbFWkM4NmlusSUrb4zBh3P2aOyaqNW5xJlDnh+JCvdd2fzAM5I7Sm agKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733045166; x=1733649966; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YhVcq18xXaiXrxaGAxTQ8rrN2vBvjLpzHZ1IStLRCKA=; b=Ct2kqDKTHcwJizN1ouVDxLYGQSPAWfXxSUCqSqfpfdFYrT0BqeOILLZJJnUieu5aTO mF3IW9JPWuZoH/YVzamDFA8xKrg8Fp9bXlb36b3509yAyRYwlnnh0LVtZaiKyvpvW/kO KMy2gDz1f6a/wWAT3l1iMMlsm4NLu+3T7AmefK+QkDy6ttF0qt3Jtz51glDeWbIm2jfg ogzBlmO7NuoxN39AhquBXfsroioj+h8Ux/RkUAeqg6UfG5M5UvFnp5idHzGplGFdDHN8 vzf0Y/1XevjNKiodEw4/Q8F3B5I0c05I+NxoXeMTvQC+C1NQkvOdRT6vSrazPB/WOfUV UqJQ== X-Forwarded-Encrypted: i=1; AJvYcCWffXeAIACETpnewnj7oy/6K2DRqLXVuNKYqegfF6eZUzZ2ZCW4G4w7VON+52+r3ZczZJJC4w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx2xBc8eskD8BagBfPQqhFTTD5TGxro8fT2HrY10MiDVvdSqe1G pQA2GsPkrM3AtINRNEVudAIC2SjT1Nfv8d5Dcmor0Xln4dg5Ios4 X-Gm-Gg: ASbGncs/r2/8migqnozQK+08xxVlM91Mt8dMMKwvVyiGM9ji5DDfswWYZSwYAwWM43i RDNBCdl5kN4JGLVyMat9wPMMX0sjBJDlcUO7rajRs9bEcq6dxHhFYW8w6BuImMcW9k05FN1+k+l rb17jc1qu63tr8j9mJxXhnK2JEhWe3cAVpJiSxRJB4Mmixb/IqwamhCfyO6fQBh2Cplo6NuMx4q qw1vgrGx5vlLA/oP4V3HQsIwS/fdYhxcpG8RCw4irgyqENCAC9aJFvPJzwTs+IDVHbhvcwAXw== X-Google-Smtp-Source: AGHT+IHARLesImHN4jld7aqTW0TlAJcrzdVZ/mEuoxDN7WAFfzZqmL2OM2ShWWRviJDfRrpopm+sYA== X-Received: by 2002:a05:6a20:9f47:b0:1e1:384e:20f1 with SMTP id adf61e73a8af0-1e1384e2124mr10979742637.25.1733045165979; Sun, 01 Dec 2024 01:26:05 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:71b7:718f:7faa:8436]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fc9c30c26dsm5779924a12.30.2024.12.01.01.26.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2024 01:26:05 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3776.700.51) 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:296229 Archived-At: > On Nov 30, 2024, at 12:49=E2=80=AFPM, J=C3=B8rgen Kvalsvik = wrote: >=20 > On 11/30/24 01:16, Yuan Fu wrote: >>> On Nov 29, 2024, at 1:05=E2=80=AFAM, J=C3=B8rgen Kvalsvik = wrote: >>>=20 >>> On 11/29/24 08:57, Eli Zaretskii wrote: >>>>> Cc: theo@thornhill.no,casouri@gmail.com >>>>> From: J=C3=B8rgen Kvalsvik >>>>> Date: Sun, 24 Nov 2024 10:15:12 +0100 >>>>>=20 >>>>> * 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. >>>=20 >>> Ok. Yuan, would you like me to submit a revision? >> Since your assignment is already done, let=E2=80=99s just apply your = patch, and I=E2=80=99ll rebase my changes on top of yours. So yeah, do = send the revision patch, thanks! >> Yuan >=20 > Certainly - I posted it on the bug tracker. Thanks J=C3=B8rgen. What did you use to generate the patch? For some = reason I can=E2=80=99t apply it. My git skill isn=E2=80=99t that great = so it could be my problem. If you can apply it fine maybe you can share = the command you used? BTW, the commit title is missing. When you add the title, you can also = add the bug number. For example: Improve c-ts-mode indentation for macros (bug#74507) Yuan=