help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To setq or not setq, that is the question.


From: Pascal J. Bourguignon
Subject: Re: To setq or not setq, that is the question.
Date: Fri, 26 Feb 2010 01:23:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (darwin)

Bill <bsagert@gmail.com> writes:

> Newbie here.
>
> In my .emacs file (blink-cursor-mode nil) works correctly.
> Also (setq visible-bell t) works as promised.
>
> Is there some clue I am missing as to when setq is required and when
> not?

setq may be used to modify a global variable. 

But for customization variables, it's preferable not to use setq, but to
customize them interactively, and consequently, to let emacs edit the
custom-set-variables form where they're set.  Then you can also edit it
manually this custom-set-variables form directly in ~/.emacs, or you can
continue using  M-x customize-variable.


So, if the variable is declared with defcustom, use M-x
customize-variable, so that the variable is set in the
custom-set-variables form.

If the variable is declared with defvar, then you may use setq.

Otherwise it's better if you avoid it.

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]