unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: help-gnu-emacs@gnu.org
Subject: Re: HELP with cc-mode and emacs
Date: Tue, 12 Jun 2007 23:40:51 +0100	[thread overview]
Message-ID: <20070612224051.GA1427@muc.de> (raw)
In-Reply-To: <Xns994D5E958F19Bchrisyahoocom@66.150.105.47>

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
<http://cc-mode.sf.net/html-manual/index.html>.  But I urge you to get
and use makeinfo, and install cc-mode.info 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_
work.

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	other threads:[~2007-06-12 22:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2018.1181658574.32220.help-gnu-emacs@gnu.org>
2007-06-12 14:25 ` HELP with cc-mode and emacs Chris
2007-06-12 22:40   ` Alan Mackenzie [this message]
     [not found]   ` <mailman.2062.1181682916.32220.help-gnu-emacs@gnu.org>
2007-06-13 13:31     ` Chris
2007-06-13 16:03       ` Peter Dyballa
2007-06-13 18:06       ` Alan Mackenzie
2007-06-11 20:14 Chris
2007-06-12 15:52 ` Alan Mackenzie
2007-06-12 15:55 ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070612224051.GA1427@muc.de \
    --to=acm@muc.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).