diff --git a/emacs.d/20-c-mode.el b/emacs.d/20-c-mode.el index 2b05b94..ec778a9 100644 --- a/emacs.d/20-c-mode.el +++ b/emacs.d/20-c-mode.el @@ -1,3 +1,9 @@ (add-hook 'c-mode-hook (lambda () - (local-set-key [f11] 'c-toggle-header-source))) + (local-set-key [f11] 'c-toggle-header-source) + (local-set-key "\C-m" + (lambda () + (interactive) + (c-indent-new-comment-line) + (c-indent-line-or-region))) + (local-set-key [C-return] 'newline)))