From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: robert.thorpe@antenova.com Newsgroups: gmane.emacs.help Subject: Re: what confuse me is ... Date: 14 Sep 2006 08:21:48 -0700 Organization: http://groups.google.com Message-ID: <1158247308.610920.315590@e3g2000cwe.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1158248495 26002 80.91.229.2 (14 Sep 2006 15:41:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2006 15:41:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 14 17:41:34 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNtKm-00031v-S9 for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 17:41:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNtKm-0007ZI-BE for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 11:41:00 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e3g2000cwe.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 213.94.228.210 Original-X-Trace: posting.google.com 1158247312 7281 127.0.0.1 (14 Sep 2006 15:21:52 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 14 Sep 2006 15:21:52 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 EMF3ASPROXY03 Complaints-To: groups-abuse@google.com Injection-Info: e3g2000cwe.googlegroups.com; posting-host=213.94.228.210; posting-account=hWoAPxMAAAAnBKSBz1ZivwUPPjEuve7bvVCHZQ8rhrluPfwcBJd92w Original-Xref: shelby.stanford.edu gnu.emacs.help:141745 Original-To: help-gnu-emacs@gnu.org 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:37367 Archived-At: jronald wrote: > By consulting c-default-style in emacs's doc, > it says: > > c-default-style's value is > ((java-mode . "java") > (other . "gnu")) > > but I'm editing a .cpp file. c-default-style is a CC mode variable. CC mode deals with all langauges that are similar to C, such as Java, C++, C, and lots of other obscure langs. When you see "c-mode" in a buffer it means that you're using a C mode that is internally part of CC-mode. As a result this variable can have values for every one of these programming languages. For example, you can do:- (setq c-default-style "k&r") ;; Use kernigham & ritchie style for everything or specifying different styles for each mode that CC-mode controls.. (setq c-default-style '((java-mode . "java") (c-mode . "gnu") (other . "whitesmith"))) I think the name is rather confusing, it probably should be changed.