GNU bug report logs -
#74507
[PATCH] Indent compounds c-ts-mode when { is not BOL
Previous Next
Reported by: Jørgen Kvalsvik <j <at> lambda.is>
Date: Sun, 24 Nov 2024 09:16:02 UTC
Severity: normal
Tags: patch
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 74507 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 12/1/24 10:25, Yuan Fu wrote:
>
>
>> On Nov 30, 2024, at 12:49 PM, Jørgen Kvalsvik <j <at> lambda.is> wrote:
>>
>> On 11/30/24 01:16, Yuan Fu wrote:
>>>> On Nov 29, 2024, at 1:05 AM, Jørgen Kvalsvik <j <at> lambda.is> wrote:
>>>>
>>>> On 11/29/24 08:57, Eli Zaretskii wrote:
>>>>>> Cc: theo <at> thornhill.no,casouri <at> gmail.com
>>>>>> From: Jørgen Kvalsvik <j <at> lambda.is>
>>>>>> 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. What did you use to generate the patch? For some reason I can’t apply it. My git skill isn’t that great so it could be my problem. If you can apply it fine maybe you can share the command you used?
I used git format-patch HEAD~1, and I just tested applying it to master
with `git am 0001-Indent-compounds-in-c-ts-mode-when-is-not-BOL.patch'
which worked.
>
> 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
Sure. I've attached a new patch with the bug in it. I tested it and it
applies cleanly with `git am
0001-Improve-c-ts-mode-compound-indents-bug-74507.patch'
[0001-Improve-c-ts-mode-compound-indents-bug-74507.patch (text/x-patch, attachment)]
This bug report was last modified 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.