# HG changeset patch # User Miles Bader # Date 972830998 0 # Node ID 9559a9aeff3cb6d261b716e44212082f84371a9b # Parent 42e1189597150bdfc4c4c862056653994926280b (custom-add-to-group): Allow multiple entries for a given value OPTION, as long as their widget types are different. diff -r 42e118959715 -r 9559a9aeff3c lisp/custom.el --- a/lisp/custom.el Sun Oct 29 14:49:01 2000 +0000 +++ b/lisp/custom.el Sun Oct 29 14:49:58 2000 +0000 @@ -319,12 +319,12 @@ (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 that option, overwrite it." - (let* ((members (get group 'custom-group)) - (old (assq option members))) - (if old - (setcar (cdr old) widget) - (put group 'custom-group (nconc members (list (list option widget))))))) +If there already is an entry for OPTION and WIDGET, nothing is done." + (let ((members (get group 'custom-group)) + (entry (list option widget))) + (message "adding %s" entry) + (unless (member entry members) + (put group 'custom-group (nconc members (list entry)))))) ;;; Properties.