From 2e2f013cbbe1fc78c936d245ca39998d1abb7a12 Mon Sep 17 00:00:00 2001 From: Ravi R Kiran Date: Fri, 27 Dec 2013 19:04:16 -0800 Subject: More C++ cleanups Special handling of parentheses will have to wait until we sort out smartparens in C++ mode diff --git a/ravi-init-cpp.el b/ravi-init-cpp.el index 7157c17..8e9e9ff 100644 --- a/ravi-init-cpp.el +++ b/ravi-init-cpp.el @@ -166,6 +166,12 @@ (c-set-style "stroustrup") (setq c-basic-offset 2) (setq c-recognize-knr-p nil) + (add-to-list 'c-cleanup-list 'empty-defun-braces) + (add-to-list 'c-cleanup-list 'defun-close-semi) + (add-to-list 'c-cleanup-list 'list-close-comma) + (add-to-list 'c-cleanup-list 'scope-operator) + (add-to-list 'c-cleanup-list 'one-liner-defun) + (add-to-list 'c-cleanup-list 'comment-close-slash) (font-lock-add-keywords 'c++-mode '(("\\<\\(assert\\|DEBUG\\)(" 1 font-lock-warning-face t)))) @@ -307,7 +313,6 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (newline-and-indent)) (bind-key "," 'insert-comma c-mode-base-map) - (bind-key ";" 'insert-semicolon c-mode-base-map) (bind-key "" 'compile-dwim c-mode-base-map) @@ -319,19 +324,6 @@ this to 3 makes header-protection define KIG_MISC_NEWTYPE_H for a file named (bind-key "" 'show-ifdef-block c-mode-base-map) ;; (setq c-syntactic-indentation nil) - - ;; (bind-key "#" 'self-insert-command c-mode-base-map) - ;; (bind-key "{" 'self-insert-command c-mode-base-map) - ;; (bind-key "}" 'self-insert-command c-mode-base-map) - ;; (bind-key "/" 'self-insert-command c-mode-base-map) - ;; (bind-key "*" 'self-insert-command c-mode-base-map) - ;; (bind-key ";" 'self-insert-command c-mode-base-map) - ;; (bind-key "," 'self-insert-command c-mode-base-map) - ;; (bind-key ":" 'self-insert-command c-mode-base-map) - ;; (bind-key "(" 'self-insert-command c-mode-base-map) - ;; (bind-key ")" 'self-insert-command c-mode-base-map) - ;; (bind-key "<" 'self-insert-command c++-mode-map) - ;; (bind-key ">" 'self-insert-command c++-mode-map) ) ) -- cgit v0.10.1