all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Shouldn't custom.el load wid-edit.el?
@ 2007-12-26 19:30 Drew Adams
  2007-12-27 13:42 ` Richard Stallman
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2007-12-26 19:30 UTC (permalink / raw)
  To: Emacs-Devel

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?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-29 13:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-26 19:30 Shouldn't custom.el load wid-edit.el? Drew Adams
2007-12-27 13:42 ` Richard Stallman
2007-12-27 13:53   ` Lennart Borgman (gmail)
2007-12-27 15:52     ` Drew Adams
2007-12-27 15:45   ` Drew Adams
2007-12-28 13:54     ` Richard Stallman
2007-12-28 15:39       ` Drew Adams
2007-12-29 13:51         ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.