Article View: gnu.emacs.help
Article #189857autoload
From: Milton Tinkoff
Date: Thu, 25 Oct 1990 20:17
Date: Thu, 25 Oct 1990 20:17
25 lines
1510 bytes
1510 bytes
How can I get c++-mode to autoload based on the extension of the file I'm
editing? If I type 'emacs filename.c++' I want c++-mode to be loaded.
I have the following in my .emacs:
(setq load-path (append load-path '("/usr/local/src/emacs/lisp/local")))
(setq auto-mode-alist
(append '(("\\.c$" . c-mode)
("\\.h$" . c-mode)
("\\.C$" . c++-mode)
("\\.H$" . c++-mode)
("\\.c++$" . c++-mode)
("\\.h++$" . c++-mode))
auto-mode-alist))
(autoload 'c++-mode "c++-mode.elc" "c++ mode" t nil)
If I do a M-x c++mode it loads fine. What am I doing wrong?
--
-------------------------------------------------------------------------------
Milt Tinkoff | "The average man is a
Silicon Graphics Inc. | stupid man."
milt@waynes-world.esd.sgi.com | -Ed Mao
Technical Details
Message-ID:
<1990Oct25.201758.21004@odin.corp.sgi.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!caen!sol.ctr.columbia.edu!emory!wuarchive!usc!apple!agate!shelby!mcnc!decwrl!sgi!shinobu!odin!miltShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,3f13c7b0e7246103,start X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1990-10-25 13:17:58 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!sunic!uupsi!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!caen!sol.ctr.columbia.edu!emory!wuarchive!usc!apple!agate!shelby!mcnc!decwrl!sgi!shinobu!odin!milt From: milt@sgi.com (Milton Tinkoff) Newsgroups: gnu.emacs.help Subject: autoload Message-ID: <1990Oct25.201758.21004@odin.corp.sgi.com> Date: 25 Oct 90 20:17:58 GMT Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 25 Posted: Thu Oct 25 21:17:58 1990