Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defun wes:c-lineup-continuation (langelem)
(save-excursion
(let ((indent-point (cdr langelem)))
(goto-char indent-point)
(beginning-of-line nil)
(skip-chars-forward " \t")
(vector (+ (/ c-basic-offset 2) (current-column))))))
(c-add-style "sun"
'((c-basic-offset . 8)
(c-tab-always-indent . t)
(ispell-check-comments . exclusive)
(indent-tabs-mode . t)
(c-label-minimum-indentation . 0)
(c-hanging-comment-starter-p . nil)
(c-hanging-comment-ender-p . nil)
(c-block-comment-prefix . "* ")
(c-offsets-alist
(inextern-lang . -)
(arglist-cont . wes:c-lineup-continuation)
(arglist-cont-nonempty . wes:c-lineup-continuation)
(statement-cont . *)
(case-label . 0)
(label . -1000))))
(setf c-default-style '((java-mode . "java")
(awk-mode . "awk")
(other . "sun")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment