aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-12-31 03:42:51 +0000
committerRichard M. Stallman2007-12-31 03:42:51 +0000
commitf1201e3aedbfc10420ac6dd2427d3453383bee8a (patch)
tree489348767d649106a1b6d6e855279bb88927ab0f
parentec7d5b1e5774d6f36b065a7cf582956ed14f3bf6 (diff)
downloademacs-f1201e3aedbfc10420ac6dd2427d3453383bee8a.tar.gz
emacs-f1201e3aedbfc10420ac6dd2427d3453383bee8a.zip
(custom-add-parent-links): New arg DOC-INITIAL-STRING.
Defaults for INITIAL-STRING and DOC-INITIAL-STRING do not include `parent'. (custom-group-value-create): Pass two args to custom-add-parent-links.
-rw-r--r--lisp/cus-edit.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 7fccf0c6130..f17e6de758a 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2313,7 +2313,8 @@ Insert PREFIX first if non-nil."
2313 (insert ", ")))) 2313 (insert ", "))))
2314 (widget-put widget :buttons buttons)))) 2314 (widget-put widget :buttons buttons))))
2315 2315
2316(defun custom-add-parent-links (widget &optional initial-string) 2316(defun custom-add-parent-links (widget &optional initial-string
2317 doc-initial-string)
2317 "Add \"Parent groups: ...\" to WIDGET if the group has parents. 2318 "Add \"Parent groups: ...\" to WIDGET if the group has parents.
2318The value is non-nil if any parents were found. 2319The value is non-nil if any parents were found.
2319If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." 2320If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
@@ -2322,7 +2323,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2322 (buttons (widget-get widget :buttons)) 2323 (buttons (widget-get widget :buttons))
2323 (start (point)) 2324 (start (point))
2324 (parents nil)) 2325 (parents nil))
2325 (insert (or initial-string "Parent groups:")) 2326 (insert (or initial-string "Groups:"))
2326 (mapatoms (lambda (symbol) 2327 (mapatoms (lambda (symbol)
2327 (when (member (list name type) (get symbol 'custom-group)) 2328 (when (member (list name type) (get symbol 'custom-group))
2328 (insert " ") 2329 (insert " ")
@@ -2343,7 +2344,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
2343 (when links 2344 (when links
2344 (let ((pt (point)) 2345 (let ((pt (point))
2345 (left-margin (+ left-margin 2))) 2346 (left-margin (+ left-margin 2)))
2346 (insert "\nParent documentation: ") 2347 (insert "\n" (or doc-initial-string "Group documentation:") " ")
2347 (while links 2348 (while links
2348 (push (widget-create-child-and-convert 2349 (push (widget-create-child-and-convert
2349 widget (car links) 2350 widget (car links)
@@ -3944,7 +3945,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
3944 ;;; was made to display a group. 3945 ;;; was made to display a group.
3945 (when (eq level 1) 3946 (when (eq level 1)
3946 (if (custom-add-parent-links widget 3947 (if (custom-add-parent-links widget
3947 "Parent groups:") 3948 "Parent groups:"
3949 "Parent group documentation:")
3948 (insert "\n")))) 3950 (insert "\n"))))
3949 ;; Create level indicator. 3951 ;; Create level indicator.
3950 (insert-char ?\ (* custom-buffer-indent (1- level))) 3952 (insert-char ?\ (* custom-buffer-indent (1- level)))