linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brown <lkml@davidb.org>
To: Johannes Weiner <hannes@saeurebad.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Update emacs indentation instructions.
Date: Sat, 19 Jan 2008 20:53:12 -0800	[thread overview]
Message-ID: <20080120045312.GA9029@old.davidb.org> (raw)
In-Reply-To: <87fxwt5l6a.fsf@saeurebad.de>

On Sun, Jan 20, 2008 at 02:40:29AM +0100, Johannes Weiner wrote:

>> +(setq c-default-style "linux")
>
>This variable is not defined when emacs starts up.  Best is to always
>use a hook.

Both of these examples are directly copied out of the emacs manual.

Setting a variable before a module is loaded will override the default set
in the module.  No need to use a hook for something simple like this.

c-default-style is defined with 'defcustom':

   Declare SYMBOL as a customizable variable that defaults to VALUE.
   DOC is the variable documentation.
   
   Neither SYMBOL nor VALUE need to be quoted.
   If SYMBOL is not already bound, initialize it to VALUE.

so the intent is to allow the user to override the value by setting it
before the module is loaded.

Dave

      reply	other threads:[~2008-01-20  5:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 22:53 [PATCH] Update emacs indentation instructions David Brown
2008-01-20  1:40 ` Johannes Weiner
2008-01-20  4:53   ` David Brown [this message]

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=20080120045312.GA9029@old.davidb.org \
    --to=lkml@davidb.org \
    --cc=hannes@saeurebad.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).