Subject: bug#6617: linux kernel C style (fwd)

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 08 Sep 2021 10:40:31 +0200

Dan Nicolaescu <[email-masked]> writes:

> Statements longer than 80 columns will be broken into sensible
> chunks. Descendants are always substantially shorter than the parent
> and are placed substantially to the right. The same applies to
> function headers with a long argument list. Long strings are as well
> broken into shorter strings. The only exception to this is where
> exceeding 80 columns significantly increases readability and does not
> hide information.
>
> It is then followed by an example which is is indented only with tabs.
>
>> Looking at a random file in the linux-2.6.34.1 kernel:
>> kernel/sched.c one can see:
>>
>> static void update_group_shares_cpu(struct task_group *tg, int cpu,
>> 				    unsigned long sd_shares,
>> 				    unsigned long sd_rq_weight,
>> 				    unsigned long *usd_rq_weight)
>> {

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

It still seems to be the case that the "linux" style indents using both
tabs and spaces in Emacs 28.  I don't know what the Linux kernel style
is these days, but the suggestion in this bug report is to add a
tab-only variant.  Alan, do you have any comments about this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no