From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: How to change indent width one buffer at a time? Date: Sat, 19 Dec 2009 14:31:36 -0700 Message-ID: References: <26842186.post@talk.nabble.com> <26847770.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1261258494 25429 80.91.229.12 (19 Dec 2009 21:34:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Dec 2009 21:34:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 19 22:34:47 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NM6wp-0007sD-9v for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Dec 2009 22:34:47 +0100 Original-Received: from localhost ([127.0.0.1]:38133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NM6wp-0003kM-CI for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Dec 2009 16:34:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NM6uF-0002h9-SM for help-gnu-emacs@gnu.org; Sat, 19 Dec 2009 16:32:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NM6uB-0002eL-3e for help-gnu-emacs@gnu.org; Sat, 19 Dec 2009 16:32:07 -0500 Original-Received: from [199.232.76.173] (port=34709 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NM6uA-0002eB-Qs for help-gnu-emacs@gnu.org; Sat, 19 Dec 2009 16:32:02 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:55062) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NM6uA-0001Lf-80 for help-gnu-emacs@gnu.org; Sat, 19 Dec 2009 16:32:02 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NM6u6-0006xo-QD for help-gnu-emacs@gnu.org; Sat, 19 Dec 2009 22:31:58 +0100 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2009 22:31:58 +0100 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2009 22:31:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <26847770.post@talk.nabble.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70758 Archived-At: 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