Re: [PATCH] Update emacs indentation instructions.

From: David Brown
Date: Sun Jan 20 2008 - 00:23:47 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/