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: custom type `color' is not enforced Date: Wed, 19 Dec 2007 19:53:47 -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 1198112066 16471 80.91.229.12 (20 Dec 2007 00:54:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Dec 2007 00:54:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 20 01:54:37 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 1J59gK-0007Eo-Q0 for ged-emacs-devel@m.gmane.org; Thu, 20 Dec 2007 01:54:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J59g1-0004cP-9Z for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2007 19:54:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J59fa-0004Oc-8T for emacs-devel@gnu.org; Wed, 19 Dec 2007 19:53:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J59fY-0004NA-LU for emacs-devel@gnu.org; Wed, 19 Dec 2007 19:53:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J59fY-0004N4-HX for emacs-devel@gnu.org; Wed, 19 Dec 2007 19:53:48 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J59fY-0004zR-Gj for emacs-devel@gnu.org; Wed, 19 Dec 2007 19:53:48 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1J59fX-0000Jg-SN; Wed, 19 Dec 2007 19:53:47 -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:85296 Archived-At: The `color' type, in particular, should be easy to test (either the string is in the list of color names or it satisfies `#' followed by three groups of hex digits). Type `regexp' might be more difficult to test, but that too should be possible, since we issue invalid-regexp errors for strings that aren't valid regexps. I agree that these changes would be improvements. However, I don't think we have any way to test the validity of a regexp without matching it, and matching it (even against a null string) could cause an infinite loop. I have, for instance, a command `describe-option-of-type' (which I bind to `C-h M-o'). It is similar to `describe-variable', but it lets you use defcustom types to narrow the set of completion candidates. I have to say it doesn't sound tremendously useful. `C-h M-o color RET TAB' correctly gives all options defined with :type `color' (rigid equality test). However, since Emacs currently does not distinguish type `color' from type `string' (= this bug), That statement surprises me. The two types have different names, and don't behave the same, so in what sense does Emacs not distinguish them?