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

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

Re: Temporarily changing number of spaces in indentation


From: Xah Lee
Subject: Re: Temporarily changing number of spaces in indentation
Date: Wed, 4 Apr 2012 05:44:22 -0700 (PDT)
User-agent: G2/1.0

On Apr 4, 12:45 am, Vineet Naik <naik...@gmail.com> wrote:
> Hello,
>
> I usually use 4 spaces (indent-tabs-mode set to nil) to indent php code.
>
> I have the following line in .emacs file which I guess sets this behaviour
>
> (setq c-basic-offset 4)
>
> I am now temporarily working on some code which uses 8 spaces instead of 4.
>
> So I tried evaluating (setq c-basic-offset 8) in scratch buffer. I see
> 8 in the mini buffer but it still indents 4 spaces.

you probably want to eval that in your current buffer. Not scratch.
Because, am guessing it's a buffer-local var.

> Also is there a mode in emacs to smartly adapt to the indentation
> style used in a buffer ?

Try call c-guess-buffer.

 Xah


reply via email to

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