From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: defcustom: changing from defvar - order of execution Date: 4 May 2005 08:51:24 -0700 Organization: http://groups.google.com Message-ID: <1115221884.483680.249680@o13g2000cwo.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1115243169 5279 80.91.229.2 (4 May 2005 21:46:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 21:46:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 04 23:46:05 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTRgg-0002lG-Il for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 23:45:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTRo4-0005UO-L1 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2005 17:53:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: 198.74.20.118 Original-X-Trace: posting.google.com 1115221889 30275 127.0.0.1 (4 May 2005 15:51:29 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 4 May 2005 15:51:29 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=198.74.20.118; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:130652 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26304 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26304 > 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.