help-gnu-emacs
[Top][All Lists]
Advanced

[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: Wed, 13 Jun 2007 19:06:33 +0100
User-agent: Mutt/1.5.9i

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).




reply via email to

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