diff options
| author | Richard M. Stallman | 1997-06-21 20:07:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-21 20:07:48 +0000 |
| commit | cd6c09408791e310f0c1226709a8f5c5d69cc76b (patch) | |
| tree | b6743b1c7713ad6ea6407e8ab3915aebc722182a | |
| parent | d377bee9887e8ebeed65ab6fd8d6eaf5bf70354c (diff) | |
| download | emacs-cd6c09408791e310f0c1226709a8f5c5d69cc76b.tar.gz emacs-cd6c09408791e310f0c1226709a8f5c5d69cc76b.zip | |
(custom-add-parent-links): New arg INITIAL-STRING.
(custom-group-value-create): Pass that arg.
(custom-buffer-create-internal): Clarify initial documentation.
(custom-tree-group-tag): Capitalize the tag.
(custom-tree-variable-tag, custom-tree-face-tag): Likewise.
(customize-browse): Corresponding changes.
| -rw-r--r-- | lisp/cus-edit.el | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b6f4dff616c..05e3f36d33e 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -979,9 +979,10 @@ This button will have a menu with all three reset operations." | |||
| 979 | (message "Creating customization buffer...") | 979 | (message "Creating customization buffer...") |
| 980 | (custom-mode) | 980 | (custom-mode) |
| 981 | (widget-insert "This is a customization buffer. | 981 | (widget-insert "This is a customization buffer. |
| 982 | Push RET or click mouse-2 on the word ") | 982 | Square brackets show active fields; type RET or click mouse-2 |
| 983 | on an active field to invoke its action. Invoke ") | ||
| 983 | (widget-create 'info-link | 984 | (widget-create 'info-link |
| 984 | :tag "help" | 985 | :tag "Help" |
| 985 | :help-echo "Read the online help." | 986 | :help-echo "Read the online help." |
| 986 | "(emacs)Easy Customization") | 987 | "(emacs)Easy Customization") |
| 987 | (widget-insert " for more information.\n\n") | 988 | (widget-insert " for more information.\n\n") |
| @@ -1077,7 +1078,7 @@ Reset all visible items in this buffer to their standard settings." | |||
| 1077 | (custom-mode) | 1078 | (custom-mode) |
| 1078 | (widget-insert "\ | 1079 | (widget-insert "\ |
| 1079 | Invoke [+] below to expand items, and [-] to collapse items. | 1080 | Invoke [+] below to expand items, and [-] to collapse items. |
| 1080 | Invoke the [group], [face], and [option] buttons below to edit that | 1081 | Invoke the [Group], [Face], and [Option] buttons below to edit that |
| 1081 | item in another window.\n\n") | 1082 | item in another window.\n\n") |
| 1082 | (let ((custom-buffer-style 'tree)) | 1083 | (let ((custom-buffer-style 'tree)) |
| 1083 | (widget-create 'custom-group | 1084 | (widget-create 'custom-group |
| @@ -1100,7 +1101,7 @@ item in another window.\n\n") | |||
| 1100 | 1101 | ||
| 1101 | (define-widget 'custom-tree-group-tag 'push-button | 1102 | (define-widget 'custom-tree-group-tag 'push-button |
| 1102 | "Show parent in other window when activated." | 1103 | "Show parent in other window when activated." |
| 1103 | :tag "group" | 1104 | :tag "Group" |
| 1104 | :action 'custom-tree-group-tag-action) | 1105 | :action 'custom-tree-group-tag-action) |
| 1105 | 1106 | ||
| 1106 | (defun custom-tree-group-tag-action (widget &rest ignore) | 1107 | (defun custom-tree-group-tag-action (widget &rest ignore) |
| @@ -1109,7 +1110,7 @@ item in another window.\n\n") | |||
| 1109 | 1110 | ||
| 1110 | (define-widget 'custom-tree-variable-tag 'push-button | 1111 | (define-widget 'custom-tree-variable-tag 'push-button |
| 1111 | "Show parent in other window when activated." | 1112 | "Show parent in other window when activated." |
| 1112 | :tag "option" | 1113 | :tag "Option" |
| 1113 | :action 'custom-tree-variable-tag-action) | 1114 | :action 'custom-tree-variable-tag-action) |
| 1114 | 1115 | ||
| 1115 | (defun custom-tree-variable-tag-action (widget &rest ignore) | 1116 | (defun custom-tree-variable-tag-action (widget &rest ignore) |
| @@ -1118,7 +1119,7 @@ item in another window.\n\n") | |||
| 1118 | 1119 | ||
| 1119 | (define-widget 'custom-tree-face-tag 'push-button | 1120 | (define-widget 'custom-tree-face-tag 'push-button |
| 1120 | "Show parent in other window when activated." | 1121 | "Show parent in other window when activated." |
| 1121 | :tag "face" | 1122 | :tag "Face" |
| 1122 | :action 'custom-tree-face-tag-action) | 1123 | :action 'custom-tree-face-tag-action) |
| 1123 | 1124 | ||
| 1124 | (defun custom-tree-face-tag-action (widget &rest ignore) | 1125 | (defun custom-tree-face-tag-action (widget &rest ignore) |
| @@ -1527,15 +1528,16 @@ Insert PREFIX first if non-nil." | |||
| 1527 | (insert ", ")))) | 1528 | (insert ", ")))) |
| 1528 | (widget-put widget :buttons buttons)))) | 1529 | (widget-put widget :buttons buttons)))) |
| 1529 | 1530 | ||
| 1530 | (defun custom-add-parent-links (widget) | 1531 | (defun custom-add-parent-links (widget &optional initial-string) |
| 1531 | "Add `Parent groups: ...' to WIDGET. | 1532 | "Add \"Parent groups: ...\" to WIDGET if the group has parents. |
| 1532 | The value if non-nil if there are parents." | 1533 | The value if non-nil if any parents were found. |
| 1534 | If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | ||
| 1533 | (let ((name (widget-value widget)) | 1535 | (let ((name (widget-value widget)) |
| 1534 | (type (widget-type widget)) | 1536 | (type (widget-type widget)) |
| 1535 | (buttons (widget-get widget :buttons)) | 1537 | (buttons (widget-get widget :buttons)) |
| 1536 | (start (point)) | 1538 | (start (point)) |
| 1537 | found) | 1539 | found) |
| 1538 | (insert "Parent groups:") | 1540 | (insert (or initial-string "Parent groups:")) |
| 1539 | (mapatoms (lambda (symbol) | 1541 | (mapatoms (lambda (symbol) |
| 1540 | (let ((group (get symbol 'custom-group))) | 1542 | (let ((group (get symbol 'custom-group))) |
| 1541 | (when (assq name group) | 1543 | (when (assq name group) |
| @@ -2513,7 +2515,8 @@ and so forth. The remaining group tags are shown with | |||
| 2513 | (if t ;;; This should test that the buffer | 2515 | (if t ;;; This should test that the buffer |
| 2514 | ;;; was made to display a group. | 2516 | ;;; was made to display a group. |
| 2515 | (when (eq level 1) | 2517 | (when (eq level 1) |
| 2516 | (if (custom-add-parent-links widget) | 2518 | (if (custom-add-parent-links widget |
| 2519 | "Go to parent group:") | ||
| 2517 | (insert "\n")))) | 2520 | (insert "\n")))) |
| 2518 | ;; Create level indicator. | 2521 | ;; Create level indicator. |
| 2519 | (insert-char ?\ (* custom-buffer-indent (1- level))) | 2522 | (insert-char ?\ (* custom-buffer-indent (1- level))) |