changeset 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 d363790fd936
children 3889ef128488
files lisp/ChangeLog lisp/cmdloop.el lisp/custom.el
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 23 00:08:35 2011 +0100
+++ b/lisp/ChangeLog	Thu Mar 24 06:22:25 2011 +0000
@@ -1,3 +1,11 @@
+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.
+
 2011-03-21  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* cl-macs.el (revappend, nreconc):
--- a/lisp/cmdloop.el	Wed Mar 23 00:08:35 2011 +0100
+++ b/lisp/cmdloop.el	Thu Mar 24 06:22:25 2011 +0000
@@ -313,7 +313,8 @@
   :type '(choice
           (const :tag "off" nil)
           (integer :tag "time" 2)
-          (other :tag "on")))
+          (other :tag "on"))
+  :group 'keyboard)
 
 (dontusethis-set-symbol-value-handler
  'suggest-key-bindings
--- 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)