From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: indent-tabs-mode Date: Thu, 10 Aug 2006 14:27:03 +0900 Message-ID: References: <17625.10780.183387.56951@kahikatea.snap.net.nz> <17625.23143.948456.697472@kahikatea.snap.net.nz> <17625.28284.187128.699894@kahikatea.snap.net.nz> <17625.31980.322753.880555@kahikatea.snap.net.nz> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155187710 23142 80.91.229.2 (10 Aug 2006 05:28:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Aug 2006 05:28:30 +0000 (UTC) Cc: Klaus Zeitler , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 10 07:28:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GB35j-0001He-3a for ged-emacs-devel@m.gmane.org; Thu, 10 Aug 2006 07:28:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GB35i-0002HC-33 for ged-emacs-devel@m.gmane.org; Thu, 10 Aug 2006 01:28:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GB35V-0002Gh-2j for emacs-devel@gnu.org; Thu, 10 Aug 2006 01:28:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GB35T-0002GK-31 for emacs-devel@gnu.org; Thu, 10 Aug 2006 01:28:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GB35S-0002GH-UF for emacs-devel@gnu.org; Thu, 10 Aug 2006 01:28:06 -0400 Original-Received: from [203.180.232.81] (helo=mgate01.necel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GB3AH-0003XG-B5; Thu, 10 Aug 2006 01:33:05 -0400 Original-Received: from relay31.aps.necel.com (relay31 [10.29.19.54]) by mgate01.necel.com (8.13.6/8.13.1) with ESMTP id k7A44lql011523; Thu, 10 Aug 2006 14:28:03 +0900 (JST) Original-Received: from relay31.aps.necel.com ([10.29.19.16] [10.29.19.16]) by relay31.aps.necel.com with ESMTP; Thu, 10 Aug 2006 14:28:03 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay31.aps.necel.com with ESMTP; Thu, 10 Aug 2006 14:28:03 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id DB48222; Thu, 10 Aug 2006 14:27:03 +0900 (JST) Original-To: Eli Zaretskii System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Eli Zaretskii's message of "Wed, 09 Aug 2006 20:25:17 +0300") Original-Lines: 35 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58248 Archived-At: Eli Zaretskii writes: > Right. So, if we are to change anything in the related defaults (and > I'm not saying that we necessarily should), at most we should reset > indent-tabs-mode to nil when the user customizes tab-width to a > non-default value. I think that would be a bad idea too. The most common use of tab-widths other than 8 that I know of is by vi users. As far as I understand the typical vi practice, typically they: (1) Use _only_ tabs for indenting, e.g. C code. (2) Set their tab-width to be their preferred "level offset" (the amount by which e.g. C statements are indented relative to the beginning brace of their enclosing block). The claimed advantage of this is that someone who likes a different "level offset" can easily just change their tab-width and all the C code they view instantly changes (assuming that all the code they view follows this convention of course :-). In Emacs, you can easily use this convention by simply making sure tab-width and c-basic-offset are the same. If you do this, c-mode always insert tabs for indentation, one per level of indentation. C-mode doesn't have to do anything special for this to work, it just naturally falls out of the way Emacs indentation primitives work. But of course it only does the right thing if indent-tabs-mode is t. -Miles -- `Suppose Korea goes to the World Cup final against Japan and wins,' Moon said. `All the past could be forgiven.' [NYT]