[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indent-tabs-mode

From: Miles Bader
Subject: Re: indent-tabs-mode
Date: Thu, 10 Aug 2006 14:27:03 +0900

Eli Zaretskii <address@hidden> 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

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.

`Suppose Korea goes to the World Cup final against Japan and wins,' Moon said.
`All the past could be forgiven.'   [NYT]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]