From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Slass Newsgroups: gmane.emacs.help Subject: Re: emacs 20.7.1 forgets c-basic-offset after find-file Date: Tue, 13 Jul 2004 09:53:29 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1089737918 22968 80.91.224.253 (13 Jul 2004 16:58:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Jul 2004 16:58:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 13 18:58:15 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BkQbe-0001kp-00 for ; Tue, 13 Jul 2004 18:58:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BkQe1-0000j4-Nx for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jul 2004 13:00:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 13 Jul 2004 11:53:31 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Ec1mNCmWqZl20wMwXRBz/UVbRkY= Original-Lines: 30 Original-NNTP-Posting-Host: 24.18.253.35 Original-X-Trace: sv3-GUl3O3zSLrkdNtvTDxL5offf99mahwPdI6fomSTLzHsJ2lNdEknMLUej5m0CWqmOCkC5ayzyqesWGxR!lSDbbsxqXBt9qvZzEUJJxTQBOyaUeV9kl5dfZhP5Bk7u8RIw4iiuW3VV Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:124284 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19619 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19619 Kurumi writes: >I'm running emacs 20.7.1 in Redhat 7.1, Linux 2.4.2-2. > >I have a modified .emacs file (included) to give me some key >bindings matching the other machines I work on. I also >have c-basic-offset set to 3. > >What's annoying is that after I do a "find file" (aka >open a file), emacs resets c-basic-offset to 2. This >is immediately apparent whenever it auto-indents a >line of code. When I do Customize -> specific option >-> c-basic-offset, it is indeed at 2, and I have to >change it and save it. c-mode is overwriting your setting when it loads, so you need to set your basic offset in a mode-hook. I don't know the customization interface (if any) to the c-mode hook, but you can add this to your .emacs: (defun kurimi-c-mode-setup () (setq c-basic-offset 3) ;; other c-mode customizations here ) (add-hook 'c-mode-hook 'kurimi-c-mode-setup) -- Mike Slass