;;; Code: (defun setup-c() "Set up c common mode." (setq c++-tab-always-indent 0) (setq c-basic-offset 4) ;; Default is 2 (setq c-indent-level 4) ;; Default is 2 (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60)) (setq tab-width 4) (c-set-offset 'brace-list-open 0) (c-set-offset 'substatement-open 0) (c-set-offset 'arglist-intro '+) (c-set-offset 'arglist-cont-non-empty '+) (c-set-offset 'argslist-close '+) ) (add-hook 'c-mode-common-hook 'setup-c) (defun create-cpp-class() "Create a cpp class." (interactive "Enter the name of the class: ") ) (provide 'cpp) ;;; cpp.el ends here