From 08adfdbb4b56787499888b1c6780a85e223f5e07 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 16 Nov 2005 02:02:03 +0000 Subject: [PATCH] (custom-add-parent-links): Fix bug whereby, for instance, `(fringe custom-face)' shadowed `(fringe custom-group)' in the custom-group property of the symbol frames and the fringe group got no link to its parent group frames. Doc fix. --- lisp/cus-edit.el | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 89c6d6297c1..0bd2e9bc5a8 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2124,7 +2124,7 @@ Insert PREFIX first if non-nil." (defun custom-add-parent-links (widget &optional initial-string) "Add \"Parent groups: ...\" to WIDGET if the group has parents. -The value if non-nil if any parents were found. +The value is non-nil if any parents were found. If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (let ((name (widget-value widget)) (type (widget-type widget)) @@ -2133,15 +2133,14 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (parents nil)) (insert (or initial-string "Parent groups:")) (mapatoms (lambda (symbol) - (let ((entry (assq name (get symbol 'custom-group)))) - (when (eq (nth 1 entry) type) - (insert " ") - (push (widget-create-child-and-convert - widget 'custom-group-link - :tag (custom-unlispify-tag-name symbol) - symbol) - buttons) - (setq parents (cons symbol parents)))))) + (when (member (list name type) (get symbol 'custom-group)) + (insert " ") + (push (widget-create-child-and-convert + widget 'custom-group-link + :tag (custom-unlispify-tag-name symbol) + symbol) + buttons) + (setq parents (cons symbol parents))))) (and (null (get name 'custom-links)) ;No links of its own. (= (length parents) 1) ;A single parent. (let* ((links (get (car parents) 'custom-links)) -- 2.39.2