From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Shouldn't custom.el load wid-edit.el? Date: Sat, 29 Dec 2007 08:51:49 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1198936456 24662 80.91.229.12 (29 Dec 2007 13:54:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2007 13:54:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 29 14:54:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J8c8z-0008Pu-Hl for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2007 14:54:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8c8e-0001mh-DL for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2007 08:54:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J8c6S-0000PY-9z for emacs-devel@gnu.org; Sat, 29 Dec 2007 08:51:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J8c6Q-0000Oj-RQ for emacs-devel@gnu.org; Sat, 29 Dec 2007 08:51:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J8c6Q-0000Oe-FH for emacs-devel@gnu.org; Sat, 29 Dec 2007 08:51:50 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J8c6Q-0004Fl-3E for emacs-devel@gnu.org; Sat, 29 Dec 2007 08:51:50 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J8c6P-0003Mv-DD; Sat, 29 Dec 2007 08:51:49 -0500 In-reply-to: X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:85607 Archived-At: 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.