diff options
| author | Per Abrahamsen | 2003-12-02 15:01:52 +0000 |
|---|---|---|
| committer | Per Abrahamsen | 2003-12-02 15:01:52 +0000 |
| commit | ac00d71ca6cbfef92a13f39d26633ba23281bc84 (patch) | |
| tree | d76ef65a10f1eb131919726a1c0e181f112c51cd | |
| parent | 3999c70516b3eed8554b9e13ebdf7ae3f8ea6601 (diff) | |
| download | emacs-ac00d71ca6cbfef92a13f39d26633ba23281bc84.tar.gz emacs-ac00d71ca6cbfef92a13f39d26633ba23281bc84.zip | |
2003-11-30 Per Abrahamsen <abraham@dina.kvl.dk>
* cus-edit.el (custom-add-parent-links): Add documentation links
for parent, if the item has none of its own.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 29 |
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 @@ | |||
| 1 | 2003-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 | |||
| 1 | 2003-11-30 Richard M. Stallman <rms@gnu.org> | 6 | 2003-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 | ||