;;; Code:
(defun re/c-lineup-arglist-tabs-only (ignored)
- "Line up argument lists by tabs, not spaces. Stolen from https://kernel.org/doc/html/v4.10/process/coding-style.html"
+ "Line up argument lists by tabs, not spaces.
+ Stolen from https://kernel.org/doc/html/v4.10/process/coding-style.html"
(let* ((anchor (c-langelem-pos c-syntactic-element))
(column (c-langelem-2nd-pos c-syntactic-element))
(offset (- (1+ column) anchor))
(add-hook 'c-mode-common-hook
(lambda ()
(c-add-style "linux-tabs-only"
- '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg re/c-lineup-arglist-tabs-only))))))
+ '("linux" (c-offsets-alist
+ (arglist-cont-nonempty
+ c-lineup-gcc-asm-reg
+ re/c-lineup-arglist-tabs-only))))))
(add-hook 'c-mode-hook
(lambda ()
- (setq indent-tabs-mode t)
- (setq show-trailing-whitespace t)
(setq c-backspace-function 'backward-delete-char)
- (keymap-local-set "<TAB>" #'tab-to-tab-stop)
(c-set-style "linux-tabs-only")))
(provide 're-c-style)