diff options
| author | 2009-01-30 18:23:30 +0100 | |
|---|---|---|
| committer | 2009-01-30 18:23:30 +0100 | |
| commit | c43e0e46adf79c321ed3fbf0351e1005fb8a2413 (patch) | |
| tree | 35b9ab361651f649d3c9aa69f159812eba50d154 /Documentation/CodingStyle | |
| parent | Revert "generic, x86: fix __per_cpu_load relocation" (diff) | |
| parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 (diff) | |
| download | wireguard-linux-c43e0e46adf79c321ed3fbf0351e1005fb8a2413.tar.xz wireguard-linux-c43e0e46adf79c321ed3fbf0351e1005fb8a2413.zip | |
Merge branch 'linus' into core/percpu
Conflicts:
kernel/irq/handle.c
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. |
