GNU bug report logs - #15479
Feature request: defcustom inherit type

Previous Next

Package: emacs;

Reported by: Devin Homan <devinwh7 <at> gmail.com>

Date: Sat, 28 Sep 2013 18:24:01 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15479 in the body.
You can then email your comments to 15479 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15479; Package emacs. (Sat, 28 Sep 2013 18:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devin Homan <devinwh7 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 28 Sep 2013 18:24:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devin Homan <devinwh7 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Feature request: defcustom inherit type
Date: Fri, 27 Sep 2013 22:20:03 -0800
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'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15479; Package emacs. (Mon, 07 Oct 2019 15:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 15479 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Devin Homan <devinwh7 <at> gmail.com>
Cc: 15479 <at> debbugs.gnu.org
Subject: Re: bug#15479: Feature request: defcustom inherit type
Date: Mon, 07 Oct 2019 17:32:33 +0200
Devin Homan <devinwh7 <at> gmail.com> writes:

> 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))

This sounds nice, but I don't think it's necessary to have an operator
for this.  You can just say

:type (get 'foo-bar 'custom-type)

and get the same effect.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 15:33:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15479 <at> debbugs.gnu.org and Devin Homan <devinwh7 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 15:33:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Nov 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.