all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: emacs 20.7.1 forgets c-basic-offset after find-file
Date: Tue, 13 Jul 2004 09:53:29 -0700	[thread overview]
Message-ID: <m3wu17x306.fsf@eric.rossnet.com> (raw)
In-Reply-To: sales-5C1579.09111413072004@news.sf.sbcglobal.net

Kurumi <sales@xupiter.com> 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

  reply	other threads:[~2004-07-13 16:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-13 16:11 emacs 20.7.1 forgets c-basic-offset after find-file Kurumi
2004-07-13 16:53 ` Michael Slass [this message]
2004-07-14  5:45   ` Kurumi
2004-07-13 16:56 ` martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3wu17x306.fsf@eric.rossnet.com \
    --to=miknrene@drizzle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.