From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#6617: linux kernel C style (fwd) Date: Wed, 08 Sep 2021 11:29:10 -0700 Message-ID: <871r5yyl8p.fsf@melete.silentflame.com> References: <87ee9z4g00.fsf@gnus.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="9760"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Alan Mackenzie , Dimitrios Apostolou , 6617@debbugs.gnu.org To: Lars Ingebrigtsen , Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 08 20:30:55 2021 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 1mO2LV-0002Jd-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Sep 2021 20:30:55 +0200 Original-Received: from localhost ([::1]:36490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO2LU-0008Me-4a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Sep 2021 14:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO2Kg-0008AB-UC for bug-gnu-emacs@gnu.org; Wed, 08 Sep 2021 14:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mO2Kg-00022H-KW; Wed, 08 Sep 2021 14:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mO2Kg-0005qT-HA; Wed, 08 Sep 2021 14:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 08 Sep 2021 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6617 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 6617-submit@debbugs.gnu.org id=B6617.163112576122384 (code B ref 6617); Wed, 08 Sep 2021 18:30:02 +0000 Original-Received: (at 6617) by debbugs.gnu.org; 8 Sep 2021 18:29:21 +0000 Original-Received: from localhost ([127.0.0.1]:33551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mO2K0-0005oy-QT for submit@debbugs.gnu.org; Wed, 08 Sep 2021 14:29:21 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:57003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mO2Jy-0005ol-OJ for 6617@debbugs.gnu.org; Wed, 08 Sep 2021 14:29:20 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id CB37732009F2; Wed, 8 Sep 2021 14:29:12 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Sep 2021 14:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=IAwlpMchgqLYKj2Cza7P2v3LGW aItt7s3BwDyb3UZwI=; b=YeJHbB+wTtUFLzy71dcEVdIyyexJ1LsQI+07l9fMMc KxTUaDGDP7738gTQXpKrIwRQo1g4G+EJBajdIvNvG37XMrxmPGUeQvowv3pjEC72 TJRUq3+x3kJp22lE9TVyHvuC2rrL9HQ2yFBTjrL5v3+tTYMV8ThyRdi+NBDclTpL +K2DKM9tqLTGvk6YKJIVeRcsm48D9JoCv5cYagy0Z3gGAtOrX411AMnm2BVj80Fw cQlBfnO4UK6fK75c98WQ9lkkgtLK8PYZ99WZL+GBLiA+vpi7cXy9c/LwZm4vJZM8 qeOiw0fKdXRHjkT7AWrSecUoSB3JJ9IHZCCUXVVKrqoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=IAwlpM chgqLYKj2Cza7P2v3LGWaItt7s3BwDyb3UZwI=; b=I6jyp+aeq+3/NzU48Sp9gW DW1Jm8JLSi9/BzWs2VejvhbEk7p4GlDBWJKKNJ2wHjLsNhMU3S6EN+jWLOnLdYZg EDe+i+lXIlheAyB8r/1iMuuZFkHn51IaGxfwUXxKWrHaceTLnWTchoAHbmmXtZh5 7UkFYToFFuHuq2fG/0WlqzK57umVQkMNMvPipBO6788FcEljy6MgfjVNfbpZBYEA 6pQ77T6ANQbGGChAgS4CpmS9QZRXOQt1lYc7bKvQrtkxgpYLYNKKqMuOVX6f0ujl qgq2UDi01cG3RdMk5svhMNkFeeR1pKqfbzWc2NtlXxmc6L+86j+YxAQb1TgjX9qQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudefjedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesthdtredttdertdenucfhrhhomhepufgvrghn ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeeivdefueefkeefhfeggeelleefhfdvhfduleehheegtdel iedtffehieejkeegueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Sep 2021 14:29:11 -0400 (EDT) Original-Received: by hephaestus.arizona.edu (Postfix, from userid 1000) id 358467E1ECA; Wed, 8 Sep 2021 11:29:10 -0700 (MST) In-Reply-To: <87ee9z4g00.fsf@gnus.org> 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" Xref: news.gmane.io gmane.emacs.bugs:213854 Archived-At: Hello, On Wed 08 Sep 2021 at 10:40AM +02, Lars Ingebrigtsen wrote: > Dan Nicolaescu 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? The Linux kernel style is tabs only. I think that Emacs DTRT if indent-tabs-mode is t. So, currently I have this fix in my init file: (c-add-style "linux-tabs" '("linux" (indent-tabs-mode . t))) (setq c-default-style "linux-tabs") -- Sean Whitton