Xref: utzoo gnu.emacs.help:277 comp.emacs:9475 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!SSC.GOV!allen From: allen@SSC.GOV (Mike Allen) Newsgroups: gnu.emacs.help,comp.emacs Subject: c++-mode.el Message-ID: <9011091409.AA10425@ssc.gov> Date: 9 Nov 90 14:09:56 GMT References: <125503@linus.mitre.org> Sender: daemon@tut.cis.ohio-state.edu Reply-To: allen@sscvx1.ssc.gov Followup-To: gnu.emacs.help Organization: GNUs Not Usenet Lines: 18 >>>>> On 6 Nov 90 13:28:16 GMT, jfjr@mbunix.mitre.org (Freedman) said: Freedman> Now I have c++-mode.el. How do I arrange things so that Freedman> c++-mode.el is installed and I automagically go into Freedman> c++mode when I edit a file with a .cc extension. From my .emacs: (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 auto-mode-alist (cons '("\\.latex$" . latex-mode) auto-mode-alist)) (setq completion-ignored-extensions (append completion-ignored-extensions '("..c"))) -Mike