diff options
| author | David S. Miller <davem@davemloft.net> | 2009-02-03 00:15:35 -0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-02-03 00:15:35 -0800 |
| commit | b3ff29d2ccfe3af065a9b393699a8fbf2abd1b15 (patch) | |
| tree | 99e5b423473097756353d038f922b2623f3edd2a /Documentation/CodingStyle | |
| parent | 1bded710a574f20d41bc9e7fb531301db282d623 (diff) | |
| parent | fb53fde9762432d091dac209bdf4f3f850117c55 (diff) | |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/Kconfig
Diffstat (limited to 'Documentation/CodingStyle')
| -rw-r--r-- | Documentation/CodingStyle | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 1875e502f872..72968cd5eaf3 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -483,17 +483,25 @@ values. To do the latter, you can stick the following in your .emacs file: (* (max steps 1) c-basic-offset))) +(add-hook 'c-mode-common-hook + (lambda () + ;; 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)))))) + (add-hook 'c-mode-hook (lambda () (let ((filename (buffer-file-name))) ;; Enable kernel mode for the appropriate files (when (and filename - (string-match "~/src/linux-trees" filename)) + (string-match (expand-file-name "~/src/linux-trees") + filename)) (setq indent-tabs-mode t) - (c-set-style "linux") - (c-set-offset 'arglist-cont-nonempty - '(c-lineup-gcc-asm-reg - c-lineup-arglist-tabs-only)))))) + (c-set-style "linux-tabs-only"))))) This will make emacs go better with the kernel coding style for C files below ~/src/linux-trees. |
