From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tyler Smith Newsgroups: gmane.emacs.help Subject: Re: How to set tab to be 4 (!) spaces for indention? Date: 18 Dec 2007 20:10:04 GMT Organization: Sedgeboy Inc. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1198010438 5646 80.91.229.12 (18 Dec 2007 20:40:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2007 20:40:38 +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 Dec 18 21:40:50 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 1J4jFA-00012t-Ir for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 21:40:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4jEr-00017z-De for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 15:40:29 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!post01.iad01!news.aliant.net!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Lines: 25 Original-NNTP-Posting-Host: 142.177.90.102 Original-X-Complaints-To: abuse@aliant.net Original-Xref: shelby.stanford.edu gnu.emacs.help:154760 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:50187 Archived-At: On 2007-12-18, xz wrote: > For example, I tried > > (setq default-tab-width 4) > > in the .emacs file. > > But it don't change nothing! No, it changed how tab characters are displayed. Problem is, indentation is not created with tab characters ;) If you're working in cc-mode, for example, you will want to use something like: (setq c-basic-offset 4) This is called 'syntax-driven indentation', as described (generally) in the manual node (emacs)Indentation. Details will depend on the particular mode you're in, so it will take a bit of poking around to figure out how to set the correct value for the language you're coding in. HTH, Tyler