emacs-devel
[Top][All Lists]
Advanced

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

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


From: Drew Adams
Subject: Shouldn't custom.el load wid-edit.el?
Date: Wed, 26 Dec 2007 11:30:42 -0800

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

I was surprised to find that in Emacs 22 also the type was `string'.

The problem was that the widget `color' is defined in wid-edit.el, which was
not loaded. So I now do this, which seems a bit heavy-handed for user code:

(defcustom... :type (if (and (require 'wid-edit nil t)
                             (get 'color 'widget-type))
                        'color
                      'string) ...)

Shouldn't custom.el, which defines `defcustom', load wid-edit.el? How else
can :type reasonably deal with types such as `color' that are defined in
wid-edit.el?






reply via email to

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