809 ;; ---------------------------------------------------------------------- |
809 ;; ---------------------------------------------------------------------- |
810 ;; C, c-lang |
810 ;; C, c-lang |
811 (setq c-echo-syntactic-information-p t) |
811 (setq c-echo-syntactic-information-p t) |
812 |
812 |
813 (defconst my-c-style |
813 (defconst my-c-style |
814 '((c-tab-always-indent . t) |
814 '((c-tab-always-indent . t) |
815 (c-comment-only-line-offset . 4) |
815 (c-comment-only-line-offset . 4) |
816 (c-hanging-braces-alist . ((substatement-open after) |
816 (c-hanging-braces-alist |
817 (brace-list-open))) |
817 . ((substatement-open after) |
818 (c-hanging-colons-alist . ((member-init-intro before) |
818 (brace-list-open))) |
819 (inher-intro) |
819 (c-hanging-colons-alist |
820 (case-label after) |
820 . ((member-init-intro before) |
821 (label after) |
821 (inher-intro) |
822 (access-label after))) |
822 (case-label after) |
823 (c-cleanup-list . (scope-operator |
823 (label after) |
824 empty-defun-braces |
824 (access-label after))) |
825 defun-close-semi)) |
825 (c-cleanup-list |
826 (c-offsets-alist . ((arglist-intro . ++) |
826 . (scope-operator |
827 (arglist-close . c-lineup-arglist) |
827 empty-defun-braces |
828 (arglist-cont-nonempty . ++) |
828 defun-close-semi)) |
829 (statement-block-intro . +) |
829 (c-offsets-alist |
830 (inline-open . 0) |
830 . ((arglist-intro . ++) |
831 (inexpr-class . 0) |
831 (arglist-close . c-lineup-arglist) |
832 (statement-cont . ++) |
832 (arglist-cont-nonempty . ++) |
833 (label . 0) |
833 (statement-block-intro . +) |
834 (substatement-open . 0) |
834 (inline-open . 0) |
835 (case-label . 0) |
835 (inexpr-class . 0) |
836 (block-open . 0) |
836 (statement-cont . ++) |
837 (comment-intro . 0) |
837 (label . 0) |
838 (knr-argdecl-intro . -))) |
838 (substatement-open . 0) |
|
839 (case-label . 0) |
|
840 (block-open . 0) |
|
841 (comment-intro . 0) |
|
842 (knr-argdecl-intro . -))) |
839 (c-echo-syntactic-information-p . t)) |
843 (c-echo-syntactic-information-p . t)) |
840 "My C Programming Style") |
844 "My C Programming Style") |
841 |
845 |
842 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode") |
846 ;; (objc-mode . "my-mode") (c++-mode . "cc-mode") |
843 (add-hook 'c-mode-common-hook |
847 (add-hook 'c-mode-common-hook |