tags:

views:

69

answers:

2

How can I get into the C++mode automaticaly when open .h files?

I uses emacs23.2 in fedura6.

I open .cpp file use C-x C-f xxx.h .

+2  A: 
(setq auto-mode-alist (cons '("\\.h$" . c++-mode) auto-mode-alist))
Trey Jackson
+2  A: 

probably this will be better aesthetically?

(add-to-list 'auto-mode-alist (cons "\\.h\\'" 'c++-mode))
suvayu