(setq auto-mode-alist
      (append
       (list
	(cons "\\.c$" 'c++-c-mode)
	(cons "\\.idl$" 'c++-c-mode)
        (cons "\\.cc$" 'c++-mode)
        (cons "\\.h$" 'c++-mode)
;;;     (cons "\\.h$" 'c++-c-mode)
        (cons "\\.C$" 'c++-mode))
       auto-mode-alist))

(autoload 'c++-mode "cplus-md1" nil t)
(autoload 'c++-c-mode "cplus-md1" nil t)
(autoload 'set-c-style "c-style" nil t)

;;
;;	Set the default C and C++ styles
;;
(add-hook 'c++-mode-hook
  '(lambda ()
     (setq c-indent-level 4
	   c-continued-statement-offset 4
	   c-continued-brace-offset 0
	   c-brace-offset -4
	   c-brace-imaginary-offset 0
	   c-argdecl-indent 5
	   c-label-offset -4
	   c++-access-specifier-offset -2
	   c++-empty-arglist-indent 4
	   c++-friend-offset 0)))

(add-hook 'c++-c-mode-hook
  '(lambda ()
     (setq c-indent-level 4
	   c-continued-statement-offset 4
	   c-continued-brace-offset 0
	   c-brace-offset -4
	   c-brace-imaginary-offset 0
	   c-argdecl-indent 5
	   c-label-offset -4
	   c++-access-specifier-offset -2
	   c++-empty-arglist-indent 4
	   c++-friend-offset 0)))
