🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189233

Re: C++ Mode

#189233
From: Mike Allen
Date: Tue, 16 Apr 1991 12:31
31 lines
2262 bytes
>>>>> On 16 Apr 91 03:25:11 GMT, zhou@seat.ece.cmu.edu (Frank Lei Zhou) said:

In article <ZHOU.91Apr15232511@seat.ece.cmu.edu> zhou@seat.ece.cmu.edu (Frank Lei Zhou) writes:

Frank> Could anyone tell me if there is a C++ mode around? If not, I'd like to
Frank> use C mode to edit C++ programs with the file suffix .C. How could I let
Frank> gnu emacs load C mode when a .C file is read in?
There is a c++-mode.el in the etc subdirectory of the libg++
distribution.  Here is what I use in my .emacs to get c++ mode loaded:

(autoload 'c++-mode "c++-mode" "Edit file FILENAME in c++-mode." t)
(setq auto-mode-alist (cons '("\\.hxx$" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.cxx$" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.h\\+\\+$" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.c\\+\\+$" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.C$" . c++-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.cc$" . c++-mode) auto-mode-alist))
(setq completion-ignored-extensions
      (append completion-ignored-extensions '("..c")))
--
===============================================================================
			   Michael E. Allen
			    Mail Stop 1046
			    SSC Laboratory
			2550 Beckleymeade Ave.
			   Dallas, TX 75237
			    (214)708-3031

al tadin et khaverkha 'ad shetagi'a limkomo
			-Ethics of the Fathers
Do not judge your fellow man until you have come to his place.
Technical Details
Message-ID: <ALLEN.91Apr16083108@manic.ssc.gov>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!sunova!sunova.ssc.gov!allen
References: <ZHOU.91Apr15232511@seat.ece.cmu.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,ff8b9eab207187f4
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-04-16 14:42:44 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!sunova!sunova.ssc.gov!allen
From: allen@manic.ssc.gov (Mike Allen)
Newsgroups: gnu.emacs.help
Subject: Re: C++ Mode
Message-ID: <ALLEN.91Apr16083108@manic.ssc.gov>
Date: 16 Apr 91 12:31:08 GMT
References: <ZHOU.91Apr15232511@seat.ece.cmu.edu>
Sender: usenet@sunova.ssc.gov
Reply-To: allen@sscvx1.ssc.gov
Distribution: gnu
Organization: SSC Laboratory, Dallas, TX
Lines: 31
In-Reply-To: zhou@seat.ece.cmu.edu's message of 16 Apr 91 03:25:11 GMT
Nntp-Posting-Host: manic