help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to set tab to be 4 (!) spaces for indention?


From: Tyler Smith
Subject: Re: How to set tab to be 4 (!) spaces for indention?
Date: 18 Dec 2007 20:10:04 GMT
User-agent: slrn/0.9.8.1pl1 (Debian)

On 2007-12-18, xz <address@hidden> 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



reply via email to

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