[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shouldn't custom.el load wid-edit.el?

From: Richard Stallman
Subject: Re: Shouldn't custom.el load wid-edit.el?
Date: Sat, 29 Dec 2007 08:51:49 -0500

    What type does it record? See the example I gave (repeated below). defcustom
    _evaluates_ the :type sexp you give it.

Which is nearly always a constant.

     That means the defcustom needs to
    recognize the set of basic types at that time, in order to eval that sexp.

It just records the value.  It doesn't have to check it at all.

    > I did this, to let some code work also in older Emacs versions
    > that don't define type `color':
    > (defcustom... :type (if (get 'color 'widget-type)
    >                         'color
    >                       'string)
    >  ...)

That is a very strange thing to do.  If it works, ok.
If it doesn't, that isn't a bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]