bug-gnu-emacs
[Top][All Lists]
Advanced

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

RE: custom type `color' is not enforced


From: Drew Adams
Subject: RE: custom type `color' is not enforced
Date: Sun, 2 Dec 2007 00:59:39 -0800

Similarly, a variable declared to be of type `regexp' should have its value
tested to ensure that it is a valid regexp. Currently, any string is
accepted.

> emacs -Q
>
> (defcustom foo "White" "xxxxxxx" :type (quote color))
>
> M-x customize-variable foo
>
> In Customize, change the value to "any-non-color-string". You are able
> to set the new value and even save it. There is no check done that the
> value is actually a color - any string will do. The value should be
> checked to ensure that it matches either a defined color name or "#"
> followed by a multiple of three hex digits (for RGB).
>
>
> In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
>  of 2007-06-02 on RELEASE
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags
> -Ic:/gnuwin32/include'
>
>





reply via email to

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