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

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

Re: How to change indent width one buffer at a time?


From: Kevin Rodgers
Subject: Re: How to change indent width one buffer at a time?
Date: Sat, 19 Dec 2009 14:31:36 -0700
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Mat wrote:
OK, so the answer is "M-x set-variable", "c-basic-offset", then the value. I was surprised that doing the setf in .emacs affects every buffer, but

Because cc-vars hasn't been loaded at that point, so you are setting its
global default value (effectively, setq-default).

doing it interactively only changes the current buffer.

,----[ C-h v c-basic-offset RET ]
| c-basic-offset is a variable defined in `cc-vars.el'.
| Its value is 2
| Local in buffer foo.c; global value is set-from-style
| Automatically becomes buffer-local when set in any fashion.
|
|
| This variable is safe as a file local variable if its value
| satisfies the predicate `integerp'.
|
| Documentation:
| *Amount of basic offset used by + and - symbols in `c-offsets-alist'.
| Also used as the indentation step when `c-syntactic-indentation' is
| nil.
|
| This is a style variable.  Apart from the valid values described
| above, it can be set to the symbol `set-from-style'.  In that case, it
| takes its value from the style system (see `c-default-style' and
| `c-style-alist') when a CC Mode buffer is initialized.  Otherwise,
| the value set here overrides the style system (there is a variable
| `c-old-style-variable-behavior' that changes this, though).
|
| You can customize this variable.
|
| [back]
`----

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

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