Per Abrahamsen wrote:
Let us say that someone writes a defcustom in a package he distributes.
Later she/he for some reason changes the list of choices. If a user has
saved a value through custom that now no longer exists he can not
correct it through custom.
He can, unless that functionality has been changed. Customize will
present the invalid value in an sexp widget. Which seems the most
reasonable thing to in the general case.
If he don't know what to do with an sexp, he can do a "Reset to
standard value", and then use the structured editor.
I think it would be good then if the list of choices were available.
You could special case the "choice" widget (most widget can have
"invalid value", so the problem is general). But I don't think the
code complexity would outweigh the minor convenience of not having to
do a "Reset to standard" first.
I believe "Reset to standard value" has changed name to "Erase
Customization". Yes, you can use that, but the list of choices does not
appear until next time you run customize. Is not that quite a bit
confusing? Are you saying that it would be hard to redraw the widget in
those cases?
Here is some new test code for those who want to see what is going on:
(custom-set-variables '(test-choice "Bad choice"))
(setq test-choice "A very bad choice!")
(customize-option-other-window 'test-choice)
(defcustom test-choice "AAA"
"Testing of bad choices."
:type '(choice (const "AAA")
(const "BBB")))
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel