From dd4d3cb6247087da635d6f370598f206ed9a454e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 29 Oct 2000 14:51:24 +0000 Subject: [PATCH] (custom-add-to-group): Allow multiple entries for a given value OPTION, as long as their widget types are different. --- lisp/ChangeLog | 9 +++++++++ lisp/custom.el | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 706751d315a..7ce144dcc86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2000-10-29 Miles Bader + + * custom.el (custom-add-to-group): Allow multiple entries for a + given value OPTION, as long as their widget types are different. + * cus-edit.el (custom-face-value-create): If face name doesn't end + with "face", add such here (similar to custom group widgets). + + * comint.el (comint-highlight-prompt): Add :type. + 2000-10-28 John Wiegley * textmodes/flyspell.el (flyspell-maybe-correct-transposition): diff --git a/lisp/custom.el b/lisp/custom.el index ef0fce7ecb4..ca5948d1ddc 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -319,12 +319,12 @@ information." (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. -- 2.39.2