unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* custom type `color' is not enforced
@ 2007-12-02  8:55 Drew Adams
  2007-12-02  8:59 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2007-12-02  8:55 UTC (permalink / raw)
  To: Bug-Gnu-Emacs

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'






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

* RE: custom type `color' is not enforced
  2007-12-02  8:55 custom type `color' is not enforced Drew Adams
@ 2007-12-02  8:59 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2007-12-02  8:59 UTC (permalink / raw)
  To: Bug-Gnu-Emacs

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'
>
>





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

end of thread, other threads:[~2007-12-02  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-02  8:55 custom type `color' is not enforced Drew Adams
2007-12-02  8:59 ` Drew Adams

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).