From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: HELP with cc-mode and emacs Date: Tue, 12 Jun 2007 23:40:51 +0100 Message-ID: <20070612224051.GA1427@muc.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181682936 13407 80.91.229.12 (12 Jun 2007 21:15:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2007 21:15:36 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 12 23:15:35 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HyDi9-0006o3-FR for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 23:15:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyDi8-0006vX-WF for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 17:15:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HyDhq-0006qk-Bh for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 17:15:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HyDho-0006mr-V4 for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 17:15:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HyDho-0006mf-F1 for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 17:15:12 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HyDhn-0001FI-R1 for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 17:15:12 -0400 Original-Received: (qmail 39416 invoked by uid 3782); 12 Jun 2007 21:15:09 -0000 Original-Received: from acm.muc.de (p54A3FAF6.dip.t-dialin.net [84.163.250.246]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 12 Jun 2007 23:15:07 +0200 Original-Received: (qmail 1836 invoked by uid 1000); 12 Jun 2007 22:40:51 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44979 Archived-At: 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 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)