aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/cus-edit.el29
2 files changed, 28 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b6fba5cdea2..84746d2a325 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12003-11-30 Per Abrahamsen <abraham@dina.kvl.dk>
2
3 * cus-edit.el (custom-add-parent-links): Add documentation links
4 for parent, if the item has none of its own.
5
12003-11-30 Richard M. Stallman <rms@gnu.org> 62003-11-30 Richard M. Stallman <rms@gnu.org>
2 7
3 * dired-aux.el (dired-do-query-replace-regexp): 8 * dired-aux.el (dired-do-query-replace-regexp):
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index f33e56a02aa..bf92e8df9cf 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1956,7 +1956,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
1956 (type (widget-type widget)) 1956 (type (widget-type widget))
1957 (buttons (widget-get widget :buttons)) 1957 (buttons (widget-get widget :buttons))
1958 (start (point)) 1958 (start (point))
1959 found) 1959 (parents nil))
1960 (insert (or initial-string "Parent groups:")) 1960 (insert (or initial-string "Parent groups:"))
1961 (mapatoms (lambda (symbol) 1961 (mapatoms (lambda (symbol)
1962 (let ((entry (assq name (get symbol 'custom-group)))) 1962 (let ((entry (assq name (get symbol 'custom-group))))
@@ -1967,12 +1967,29 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
1967 :tag (custom-unlispify-tag-name symbol) 1967 :tag (custom-unlispify-tag-name symbol)
1968 symbol) 1968 symbol)
1969 buttons) 1969 buttons)
1970 (setq found t))))) 1970 (setq parents (cons symbol parents))))))
1971 (widget-put widget :buttons buttons) 1971 (and (null (get symbol 'custom-links)) ;No links of its own.
1972 (if found 1972 (= (length parents) 1) ;A single parent.
1973 (insert "\n") 1973 (let ((links (get (car parents) 'custom-links)))
1974 (when links
1975 (insert "\nParent documentation: ")
1976 (while links
1977 (push (widget-create-child-and-convert widget (car links))
1978 buttons)
1979 (setq links (cdr links))
1980 (cond ((null links)
1981 (insert ".\n"))
1982 ((null (cdr links))
1983 (if many
1984 (insert ", and ")
1985 (insert " and ")))
1986 (t
1987 (insert ", ")))))))
1988 (if parents
1989 (insert "\n")
1974 (delete-region start (point))) 1990 (delete-region start (point)))
1975 found)) 1991 (widget-put widget :buttons buttons)
1992 parents))
1976 1993
1977;;; The `custom-comment' Widget. 1994;;; The `custom-comment' Widget.
1978 1995