From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dimitrios Apostolou Newsgroups: gmane.emacs.help Subject: linux kernel C style Date: Thu, 8 Jul 2010 21:56:09 +0300 (EEST) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Trace: dough.gmane.org 1278615779 14243 80.91.229.12 (8 Jul 2010 19:02:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Jul 2010 19:02:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 08 21:02:56 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWwIi-0004QF-3Z for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jul 2010 21:02:56 +0200 Original-Received: from localhost ([127.0.0.1]:50648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWwHb-00056M-EK for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jul 2010 14:57:15 -0400 Original-Received: from [140.186.70.92] (port=33100 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWwGC-0004lJ-MV for help-gnu-emacs@gnu.org; Thu, 08 Jul 2010 14:56:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWwFm-0002GA-QV for help-gnu-emacs@gnu.org; Thu, 08 Jul 2010 14:55:23 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:49656) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OWwFm-0002Fw-EJ for help-gnu-emacs@gnu.org; Thu, 08 Jul 2010 14:55:22 -0400 Original-Received: (qmail invoked by alias); 08 Jul 2010 18:55:20 -0000 Original-Received: from unknown (EHLO thanos-desktop.ics.forth.gr) [139.91.92.11] by mail.gmx.net (mp069) with SMTP; 08 Jul 2010 20:55:20 +0200 X-Authenticated: #4463548 X-Provags-ID: V01U2FsdGVkX1/VzkdR18PVdtMozg7oAqB2k9YS7HY4724FXtBw6x 5YVobnjaxne1u1 X-X-Sender: jimis@localhost.localdomain User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74139 Archived-At: Hello list, is the "linux" c-style supposed to be compliant to the linux kernel style guidelines? I just realised that all this time emacs was indenting my code slightly wrong, specifically the use of spaces is forbidden, even when continuing the argument list of a function. I use the following lines in my .emacs, taken from Documentation/CodingStyle of the kernel tree. Perhaps they should be added to "linux" style? (defun c-lineup-arglist-tabs-only (ignored) "Line up argument lists by tabs, not spaces" (let* ((anchor (c-langelem-pos c-syntactic-element)) (column (c-langelem-2nd-pos c-syntactic-element)) (offset (- (1+ column) anchor)) (steps (floor offset c-basic-offset))) (* (max steps 1) c-basic-offset))) ;; Add kernel style (c-add-style "linux-tabs-only" '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only)))) (custom-set-variables '(c-default-style "linux-tabs-only") ) Thanks, Dimitris