From: Dimitrios Apostolou <jimis@gmx.net>
To: linux-kernel@vger.kernel.org
Cc: Dan Nicolaescu <dann@gnu.org>
Subject: emacs and "linux" coding style
Date: Tue, 13 Jul 2010 17:00:21 +0300 (EEST) [thread overview]
Message-ID: <alpine.LNX.2.00.1007131644180.1500@localhost.localdomain> (raw)
Hello list,
according to Documentation/CodingStyle the "linux" style of emacs is
broken because it uses tabs+spaces when continuing the argument list of a
function on a new line. So I reported that as a bug to bug-gnu-emacs
(bug#6617).
However it's not clear if this is a bug of emacs or an inconsistency of
the linux kernel coding style. I can't find where exactly the usage *only*
of tabs is mandated, see for example the following quote:
> 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.
Tabs are not mentioned anywhere, besides the specific part about emacs
which is so ironic that no emacs dev can read it fully. Moreover there are
many parts in the kernel that are aligned using both tabs and spaces.
Random example in the linux-2.6.34.1 kernel: kernel/sched.c
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)
{
So what do you think? Should the current emacs "linux" style be fixed, or
are spaces allowed?
Thanks,
Dimitris
next reply other threads:[~2010-07-13 13:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 14:00 Dimitrios Apostolou [this message]
2010-07-13 22:19 ` Randy Dunlap
2010-07-14 6:12 ` Theodore Tso
2010-07-15 11:46 ` Dimitrios Apostolou
2010-07-17 9:21 ` Krzysztof Halasa
2010-07-17 13:51 ` Randy Dunlap
2010-07-17 23:18 ` Krzysztof Halasa
2010-07-18 7:15 ` Ted Ts'o
2010-07-18 9:05 ` Krzysztof Halasa
2010-07-18 9:10 ` Dimitrios Apostolou
2010-07-18 9:21 ` Ted Ts'o
2010-07-18 21:53 ` Krzysztof Halasa
2010-07-18 9:37 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1007131644180.1500@localhost.localdomain \
--to=jimis@gmx.net \
--cc=dann@gnu.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome