[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Temporarily changing number of spaces in indentation
From: |
Vineet Naik |
Subject: |
Temporarily changing number of spaces in indentation |
Date: |
Wed, 4 Apr 2012 13:15:19 +0530 |
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.
If I change this line in .emacs file, save it and restart emacs, then
it uses 8 spaces correctly.
What is the correct way to achieve this ?
Also is there a mode in emacs to smartly adapt to the indentation
style used in a buffer ?
Regards,
Vineet
- Temporarily changing number of spaces in indentation,
Vineet Naik <=