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

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

Re: defcustom: changing from defvar - order of execution


From: rgb
Subject: Re: defcustom: changing from defvar - order of execution
Date: 4 May 2005 08:51:24 -0700
User-agent: G2/0.2

> I'm unclear on the recommended way to change Lisp code from
> using defvar for user options to using defcustom. I guess I'm
> also unclear on just how defcustom and Customize work. I
> couldn't find an explanation of this in Info for Emacs or Emacs Lisp.
>
It appears that defcustom acts just like defvar and
custom-set-variables acts much like setq.
So the position of your load command, with respect to the
custom-set-variables section is unimportant.
Obviously the position of your call to foo-fn IS important.

In my .emacs nothing comes before custom-set-variables.
But I notice that if the section doesn't already exist
it gets added at the end rather than the beginning.
I question the logic behind that.  Especially considering
the existence of options like :require and :set-after which
make the need for anything before it unlikely.
At least it doesn't move if it's present so you can put it
where you want and it will stay.



reply via email to

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