Mercurial > hg > xemacs-beta
diff lisp/custom.el @ 5383:294ab9180fad
#'custom-add-to-group: warn if GROUP is nil.
2011-03-24 Aidan Kehoe <kehoea@parhasard.net>
* custom.el (custom-add-to-group):
Warn if adding an option to the nil group; this is usually an
error on the part of the programmer.
* cmdloop.el (suggest-key-bindings):
Specify a group for this variable, it didn't previously have one.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 24 Mar 2011 06:22:25 +0000 |
parents | b6e59ea11533 |
children | 4dee0387b9de |
line wrap: on
line diff
--- a/lisp/custom.el Wed Mar 23 00:08:35 2011 +0100 +++ b/lisp/custom.el Thu Mar 24 06:22:25 2011 +0000 @@ -409,6 +409,9 @@ (defun custom-add-to-group (group option widget) "To existing GROUP add a new OPTION of type WIDGET. If there already is an entry for OPTION and WIDGET, nothing is done." + (or group (display-warning 'custom + (format "custom: widget %s, option %s has no associated group" + widget option))) (let ((members (get group 'custom-group)) (entry (list option widget))) (unless (member entry members)