--- a/.emacs-my Mon Sep 21 16:15:53 2009 +0300
+++ b/.emacs-my Thu Oct 01 16:10:54 2009 +0300
@@ -856,8 +856,16 @@
(setq list-command-history-max 256)
;; ----------------------------------------------------------------------
-;; C, c-lang
+;; C, cc-mode
+
(setq c-echo-syntactic-information-p t)
+(add-hook 'c-mode-common-hook
+ (lambda ()
+ ;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon.
+ (c-toggle-auto-newline -1)
+ ;; Delete all preceding whitespace by DEL.
+ (c-toggle-hungry-state -1)
+ ))
(defconst my-c-style
'((c-tab-always-indent . t)
@@ -906,20 +914,6 @@
(lambda () (c-add-style "my" my-c-style t)))
(setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (other . "my")))
-;; Customizations for all modes in CC Mode.
-;; (defun my-c-mode-common-hook ()
-;; ;; add my personal style and set it for the current buffer
-;; (c-add-style "PERSONAL" my-c-style t)
-;; ;; other customizations
-;; ;; we like auto-newline and hungry-delete
-;; (c-toggle-auto-hungry-state 1)
-;; ;; key bindings for all supported languages. We can put these in
-;; ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map,
-;; ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it.
-;; (define-key c-mode-base-map "\C-m" 'c-context-line-break))
-
-;; (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
-
;; ----------------------------------------------------------------------
;; *csharp*, c-sharp
;;