help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: major mode in emacs


From: Shai Kamin
Subject: RE: major mode in emacs
Date: Thu, 30 Nov 2000 16:30:35 +0200

Try evaluating the following expression:

(setq auto-mode-alist
      (append (list '("\\.h\\'" . c++-mode))
              auto-mode-alist))

---------------------------------------------------------
Shai Kamin, mailto:ShaiK@radlan.com
RADLAN Ltd., http://www.radlan.com
Phone: +972-3-7657936
Fax:     +972-3-6487368


-----Original Message-----
From: Peng, Guiai [IT] [mailto:guiai.peng@ssmb.com]
Sent: Thursday, November 30, 2000 4:23 PM
To: 'help-gnu-emacs@gnu.org'
Subject: major mode in emacs


Dear Sir/Madam,
I am a C++ programmer and I use emacs to edit C++ 
sourec and header files. In my project, we name 
header file with suffix ".h". But by default, emacs 
treat any header file with suffix ".h" as a c header 
file. so every time emacs read in my header file, it is 
in c major mode instead of c++ major mode. I have 
to manually change it to c++ mode. Do you know 
what I should do so that emacs treat ".h" as a C++ 
header file suffix? Thanks a lot.

guiai



_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]