emacs-devel
[Top][All Lists]
Advanced

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

Re: custom type `color' is not enforced


From: Richard Stallman
Subject: Re: custom type `color' is not enforced
Date: Wed, 19 Dec 2007 19:53:47 -0500

    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?




reply via email to

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