From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Devin Homan Newsgroups: gmane.emacs.bugs Subject: bug#15479: Feature request: defcustom inherit type Date: Fri, 27 Sep 2013 22:20:03 -0800 Message-ID: <52467513.20408@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1380392665 23794 80.91.229.3 (28 Sep 2013 18:24:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Sep 2013 18:24:25 +0000 (UTC) To: 15479@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 28 20:24:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VPzBq-0007yj-0F for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 20:24:26 +0200 Original-Received: from localhost ([::1]:42299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPzBp-0005pD-Hj for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 14:24:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPzBe-0005iY-DU for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 14:24:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPzBV-0004di-VH for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 14:24:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPzBV-0004de-Rp for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 14:24:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VPzBU-0002g6-DW for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 14:24:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Devin Homan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Sep 2013 18:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138039262710244 (code B ref -1); Sat, 28 Sep 2013 18:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Sep 2013 18:23:47 +0000 Original-Received: from localhost ([127.0.0.1]:43438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPzBC-0002f8-En for submit@debbugs.gnu.org; Sat, 28 Sep 2013 14:23:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48880) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPnw7-0000Cx-1Y for submit@debbugs.gnu.org; Sat, 28 Sep 2013 02:23:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPnvy-0006ei-EG for submit@debbugs.gnu.org; Sat, 28 Sep 2013 02:23:26 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPnvy-0006ee-B8 for submit@debbugs.gnu.org; Sat, 28 Sep 2013 02:23:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPnvp-0001xN-Qo for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 02:23:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPnvh-0006d6-Dc for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 02:23:09 -0400 Original-Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]:33765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPnvh-0006cz-5W for bug-gnu-emacs@gnu.org; Sat, 28 Sep 2013 02:23:01 -0400 Original-Received: by mail-pb0-f42.google.com with SMTP id un15so3431373pbc.29 for ; Fri, 27 Sep 2013 23:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=eWA+moByLAKfh8YEVwJBDF7WsGPfSfWy3bUSxThWD4E=; b=RCEUcQRwv+6j42wx9Pnk9EILSqHI9gggao//++vhlP4yzt3AD1orlOBq7ZmyFUNlJq UCIUL/9i8pvHjnnSO74oD/1Sm5KK72VUevR4wjaVeGZZ4UDmgK+HkddlbF1w53iZTZ/r 9rO7GKNtNehXjF+wpJReHqBeLSjTkVs8bke3mMbmdfThEDS7FBHbamyY2qppFEcqtToM EXLJIpzgHi9Cpm3olCGQfizM2vQJg529u+9nu2cF70fR/jhSlh8GFPxtjYE0+7rsFdLV /QTlM/unxdq8nRk58Q36XaNAX3TGyqvoP3vDvp4J+VtxvnEUfG9kPqHRIoeiSXQmpbdE Xf0g== X-Received: by 10.68.204.5 with SMTP id ku5mr11701191pbc.88.1380349379952; Fri, 27 Sep 2013 23:22:59 -0700 (PDT) Original-Received: from [192.168.1.101] (40-196-137-216.mtaonline.net. [216.137.196.40]) by mx.google.com with ESMTPSA id pu5sm17259722pac.21.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Sep 2013 23:22:59 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 SeaMonkey/2.20 X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 28 Sep 2013 14:23:43 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78779 Archived-At: I think that it would be useful for client code to be able to create defcustom variables that inherit their type properties from another defcustom variable so that changes in the provided code are reflected in the client. This would allow client code to create defcustom's that are used as temporary, dynamic bindings that the user can customize without having to worry about additions to the accepted types in the provided code. For example, in the provided source there is: (defcustom foo-bar "A" "Doc." :group foo :type '(string)) (defun foo-smash () "Doc." (message "%s" foo-bar)) (provide 'foo) then the client code can have: (require 'foo) (defcustom cat-thing1 "B" "Doc." :group cat :type '(inherit foo-bar)) (defcustom cat-thing2 "C" "Doc." :group cat :type '(inherit foo-bar)) (let ((foo-bar cat-thing1)) (foo-smash)) (let ((foo-bar cat-thing2)) (foo-smash)) So if the maintainer of 'foo' decides to add an additional type, such as integer, then that change will automatically be shown in 'cat'.