Enable electric new-line. Document auto indent after typing colon.
--- a/.emacs-my Thu Sep 29 15:01:34 2011 +0300
+++ b/.emacs-my Thu Sep 29 15:51:04 2011 +0300
@@ -1477,9 +1477,11 @@
(defun my-c-mode-common-hook ()
;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon.
- (c-toggle-auto-newline -1)
+ (c-toggle-auto-newline 1)
;; Delete all preceding whitespace by DEL.
(c-toggle-hungry-state -1)
+ ;; Auto indent after typing colon according to `c-hanging-colons-alist'.
+ (c-toggle-electric-state 1)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)