From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ext-chunye.wang@nokia.com Newsgroups: gmane.emacs.help Subject: Re: Force spaces instead of tabs Date: Tue, 10 Oct 2006 08:20:19 GMT Organization: Nokia Message-ID: References: <1160463886.894724.96810@i42g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160469797 18356 80.91.229.2 (10 Oct 2006 08:43:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Oct 2006 08:43:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 10 10:43:12 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 1GXDCE-0007vy-MR for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Oct 2006 10:42:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXDCE-0002OU-6w for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Oct 2006 04:42:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-NNTP-Posting-Host: 172.28.82.74 Original-X-Complaints-To: newsmaster@nokia.com Original-X-Trace: news1.nokia.com 1160468419 172.28.82.74 (Tue, 10 Oct 2006 11:20:19 EET DST) Original-NNTP-Posting-Date: Tue, 10 Oct 2006 11:20:19 EET DST Original-Xref: shelby.stanford.edu gnu.emacs.help:142337 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:37956 Archived-At: "Martin" writes: > I need to have emacs indent C++ code using only spaces, and no tab > characters. > > I edited the options in the Programming/Languages/C group so that: > C Basic Offset is 3 > C Tab Always Indent is "always indents" > C Insert Tab Function is "insert-tab" > C Syntactic Indentation is non-nil > C Offsets Alist: substatement-open is 0 > > In many cases, the indentation is correct, but when I have several > levels of sub-statements, tab characters are inserted anyway. See the > example below. What other options control this behaviour? > > void B::e() > { > if () > { > ; > if () > { > ; // tab character at beginning of this line! > } > ; > } > } try (setq indent-tabs-mode nil)