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: Wed, 13 Jun 2007 19:06:33 +0100	[thread overview]
Message-ID: <20070613180633.GA2412@muc.de> (raw)
In-Reply-To: <Xns994E557DF8805chrisyahoocom@66.150.105.47>

Hello again, Chris!

On Wed, Jun 13, 2007 at 01:31:56PM +0000, Chris wrote:
> Frustration Continues !!!

Not good!

> I started from scratch
 
> byte compiled the .el files in version 5.31.3 from inside emacs using 
> the command :

>  M-0 M-x byte-recompile-directory RET
 
OK.  I think you'd compiled CC Mode OK the first time, but recompiling
won't have done any harm.
 
> Recieved the following messages:

[ snipped ]

They look like the expected messages.  

> 
> Here is a portion of my .emacs.el:

> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; C++ Mode
> (autoload 'awk-mode "/net/wally/home/cfoster/.cc-mode-5.31.3/cc-mode" 
> nil t)

That looks fine.

> (add-hook 'awk-mode-hook '(lambda () (font-lock-mode 1)))

This looks to be not false, but probably not quite what you want.  It
will enable font-lock only for AWK files.  To enable Font Lock for all
of the CC Mode modes, use this:

    (add-hook 'cc-mode-common-hook 'turn-on-font-lock)

> (setq auto-mode-alist (cons  '("\\.cpp\\'" . awk-mode) auto-mode-alist))
> (setq auto-mode-alist (cons  '("\\.c\\'" . awk-mode) auto-mode-alist))
> (setq auto-mode-alist (cons  '("\\.h\\'" . awk-mode) auto-mode-alist))

These are definitely wrong.  You want to edit .cpp files with c++-mode,
not awk-mode.  The seven modes (c-mode, c++-mode, java-mode, objc-mode,
idl-mode, pike-mode, awk-mode) are variants on a single theme, but
aren't identical.

You should just remove these three lines; those settings were already in
Emacs-21.3.

> Any ideas?    Thanks Again
 
Er...  Um...  How is your system, set up as you've just described, not
working right at the moment?  This is quite helpful information.  ;-)
 
>          Chris Foster 

-- 
Alan Mackenzie (Ittersbach, Germany).

  parent reply	other threads:[~2007-06-13 18:06 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
     [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 [this message]
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=20070613180633.GA2412@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).