Skip to content

Instantly share code, notes, and snippets.

@richlowe
Created January 8, 2018 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richlowe/7ece959892bd3f3e001350a736d52768 to your computer and use it in GitHub Desktop.
Save richlowe/7ece959892bd3f3e001350a736d52768 to your computer and use it in GitHub Desktop.
(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