lkml.org 
[lkml]   [2008]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Update emacs indentation instructions.
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


\
 
 \ /
  Last update: 2008-01-20 06:25    [W:2.885 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site