From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Defcustoms, how do users find them? Date: Tue, 17 Nov 2009 15:22:12 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1258468031 8020 80.91.229.12 (17 Nov 2009 14:27:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2009 14:27:11 +0000 (UTC) Cc: Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 15:27:03 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NAP1J-0005yI-9r for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2009 15:27:01 +0100 Original-Received: from localhost ([127.0.0.1]:58270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAP1I-0003Fe-Oz for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2009 09:27:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAOx4-0000AK-91 for emacs-devel@gnu.org; Tue, 17 Nov 2009 09:22:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAOwz-00008z-J7 for emacs-devel@gnu.org; Tue, 17 Nov 2009 09:22:37 -0500 Original-Received: from [199.232.76.173] (port=50627 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAOwz-00008t-DV for emacs-devel@gnu.org; Tue, 17 Nov 2009 09:22:33 -0500 Original-Received: from mail-yx0-f177.google.com ([209.85.210.177]:57400) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAOwz-0004hb-2t for emacs-devel@gnu.org; Tue, 17 Nov 2009 09:22:33 -0500 Original-Received: by yxe7 with SMTP id 7so21480yxe.25 for ; Tue, 17 Nov 2009 06:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=jSKiLRWR0HHvbqRqnWqxy7jgAsZn6Lxy9AZ3tMlA1s0=; b=nQrrwkIbuVbqAPMraSI5B/EmpLu4Lz4YTvkwSutL/vgQ3gA6CW59gJ2kxOIYMnZV+g owjpQwgO/zCITBuSkuyUeI1WZ2/J+XTLAG6PSs37Im1y0gbEbc+v9uCY2kCPt8Q60MGN YxNoPoOzC4mVVqzP0xn9kA528sr+61ODcsW4I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Tcl4JRbLqWxNyjyOB9XxDS8nhYDXQXJhFN/wkCQRpXDzF8YZ1n+Vce4gvx9bDpZzfy 4aK9aNfr8JaIwpLgwm78t5obtLYLDtGSs/Tfn4iBBXYztbGDF9/qi1MXoQQxdLcscnHM f8cRanuvXclf49bfqmy1mYYFlIYY1xMWOAjuQ= Original-Received: by 10.101.106.24 with SMTP id i24mr1394103anm.102.1258467752130; Tue, 17 Nov 2009 06:22:32 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117096 Archived-At: On Tue, Nov 17, 2009 at 4:41 AM, Lennart Borgman wrote: > On Tue, Nov 17, 2009 at 4:38 AM, Stefan Monnier > wrote: >>> If it is really annoying to autoload defcustoms then maybe autoloading >>> just defgroups would be a possibility? (Or are they already autoloaded >>> in some way?) >> >> Yes, groups are autoloaded, thanks to cus-load.el. >> We could make customize-variable's completion complete to all >> defcustoms, using a similar scheme (and have customize-variable >> automatically load the var's package if it's not yet loaded). >> But autoloading the defcustoms is out of the question. > > I think that would solve the problem - if help/apropos functions also > loaded the var's package. As I understand it we then first have to modify custom-make-dependencies so that it also collects defcustoms. Changing the part where it write 'custom-loads to cus-dep.el should is enough for this I guess, see below. Is this the way to do it? (And then add the corresponding pieces to custom-variable-prompt etc.) *** In custom-make-dependencies change to this **** (mapatoms (lambda (symbol) (let ((members (get symbol 'custom-group)) where found (option (get symbol 'standard-value)) option-where option-found ) (when members (dolist (member ;; So x and no-x builds won't differ. (sort (mapcar 'car members) 'string<)) (setq where (get member 'custom-where)) (unless (or (null where) (member where found)) (push where found))) (when found (insert "(put '" (symbol-name symbol) " 'custom-loads '") (prin1 (nreverse found) (current-buffer)) (insert ")\n"))) (when option (setq option-where (get option 'custom-where)) (push option-where option-found) (insert "(put '" (symbol-name symbol) " 'custom-option-loads '") (prin1 (nreverse found) (current-buffer)) (insert ")\n")) )))