[Top][All Lists]

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

Re: HELP with cc-mode and emacs

From: Alan Mackenzie
Subject: Re: HELP with cc-mode and emacs
Date: Tue, 12 Jun 2007 23:40:51 +0100
User-agent: Mutt/1.5.9i

Hallo again, Chris!

On Tue, Jun 12, 2007 at 02:25:33PM +0000, Chris wrote:

> I did have a syntax error in .emacs.el file.
> 2 double quotes in path name where there should have been only one.

Glad you got that fixed.

> Now, when I attempt to load a file with the .cpp (or .c) extension, I
> get the following error in the Message Buffer

> File mode specification error: (void-function cc-mode)

Again, I'm having to guess what you've done.  What I think you've done is
to add some entries to auto-mode-alist, something like this:

    ("\\.c\\'" . cc-mode)

(in your .emacs.el, of course).  There isn't, in fact, a function called
cc-mode.  There's c-mode, c++-mode, java-mode, objc-mode, idl-mode,
pike-mode and awk-mode.  It even tells you this in the Fine Manual which
came with the distribution (on page "Introduction" :-).  If you haven't
got the tool to generate the info file (i.e. makeinfo), there's an
online version of the manual at
<>.  But I urge you to get
and use makeinfo, and install in your Emacs; just as soon as
you've thrown off any residual frustration, rage and confusion.  ;-)

The auto-mode-alist as it already was should have had the necessary
entries.  So if you remove your additions to it, it will _hopefully_

Again, I might be wrong about auto-mode-alist.  When you ask for help
with a problem like this, it's always best to write down everything
you've changed - for example:

    "After compiling CC Mode, I extended auto-mode-alist like this, so
    that loading my C files would get the new mode:

        (push '("\\.c\\'" . cc-mode) auto-mode-alist)."

Then we can see much more easily what's gone wrong.  Surprisingly often,
when you do this, you'll get a "Eureka moment" before you even fire the
email off.
> and it does not 'colorize'

No.  It will do though, when it finds the mode.  The Emacs jargon for
this is "Font Locking", by the way.  No, it doesn't make sense.  ;-)

> Thank You So Much! for the help 

No problem!  Hope you get it sorted out this time.
> Chris Foster 

All the best!

Alan Mackenzie (Ittersbach, Germany)

reply via email to

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