From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel Subject: Re: set-variable and defcustom Date: Sat, 05 Mar 2011 20:06:36 -0600 Message-ID: <87d3m52eab.fsf@gmail.com> References: <87ipvzplbm.fsf@gmail.com> <878vwvorj8.fsf@gmail.com> <87fwr2p4lb.fsf@gmail.com> <87sjv1gz50.fsf@stupidchicken.com> Reply-To: jay.p.belanger@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299377213 8222 80.91.229.12 (6 Mar 2011 02:06:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2011 02:06:53 +0000 (UTC) Cc: jay.p.belanger@gmail.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 06 03:06:48 2011 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.69) (envelope-from ) id 1Pw3Ms-0007ul-5C for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2011 03:06:46 +0100 Original-Received: from localhost ([127.0.0.1]:40435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pw3Mr-00052o-5p for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2011 21:06:45 -0500 Original-Received: from [140.186.70.92] (port=33211 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pw3Mm-00052Z-CO for emacs-devel@gnu.org; Sat, 05 Mar 2011 21:06:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pw3Ml-0006Ba-8w for emacs-devel@gnu.org; Sat, 05 Mar 2011 21:06:40 -0500 Original-Received: from s2.cableone.net ([24.116.0.228]:38725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pw3Ml-0006BT-2P for emacs-devel@gnu.org; Sat, 05 Mar 2011 21:06:39 -0500 Original-Received: from belanger-desktop (unverified [24.116.149.59]) by s2.cableone.net (CableOne SMTP Service s2) with ESMTP id 48537876-1872270 for multiple; Sat, 05 Mar 2011 19:06:36 -0700 In-Reply-To: <87sjv1gz50.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 05 Mar 2011 14:12:27 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Vpipe: Scanner said ok (av_avast) X-IP-stats: Incoming Last 0, First 1, in=2, out=0, spam=0 ip=24.116.149.59 X-Originating-IP: 24.116.149.59 X-Abuse-Info: Send abuse complaints to abuse@cableone.net X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 24.116.0.228 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:136802 Archived-At: Chong Yidong writes: ... >> I was wondering if it would be appropriate to have >> `custom-prompt-variable' use defcustom's :get value when it finds the >> current value of the variable, similarly to how >> `customize-set-variable' uses defcustom's :set value, namely: > > Yes, this looks right. The docstring should be fixed, too. I made the following change to the docstring: If the variable has a `custom-type' property, it must be a widget and the `:prompt-value' property of that widget will be used for reading the value. + If the variable also has a `custom-get' property, that is used for finding + the current value of the variable, otherwise `symbol-value' is used. If optional COMMENT argument is non-nil, also prompt for a comment and return it as the third element in the list."