diff options
| author | Richard M. Stallman | 1997-06-24 03:17:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-24 03:17:58 +0000 |
| commit | 8691cfa76d2d0038bb3e145073aa4a5264e29a84 (patch) | |
| tree | a05aab5747ee305d773652c3f2963db0cd6c1884 | |
| parent | 211c9fe92068f0ae73a239b23d9c32fe55873cc3 (diff) | |
| download | emacs-8691cfa76d2d0038bb3e145073aa4a5264e29a84.tar.gz emacs-8691cfa76d2d0038bb3e145073aa4a5264e29a84.zip | |
(custom-group-visibility): Widget type
moved from wid-edit.el and renamed from group-visibility.
(custom-group-visibility-create): Function renamed
and moved from wid-edit.el.
(custom-state-buffer-message): New function.
(custom-mode): Add custom-state-buffer-message to widget-edit-hook.
| -rw-r--r-- | lisp/cus-edit.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index baa2e82a65a..bdf05f2b74b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -2398,6 +2398,16 @@ and so forth. The remaining group tags are shown with | |||
| 2398 | (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) | 2398 | (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) |
| 2399 | 'custom-group-tag-face)) | 2399 | 'custom-group-tag-face)) |
| 2400 | 2400 | ||
| 2401 | (define-widget 'custom-group-visibility 'visibility | ||
| 2402 | "An indicator and manipulator for hidden group contents." | ||
| 2403 | :create 'custom-group-visibility-create) | ||
| 2404 | |||
| 2405 | (defun custom-group-visibility-create (widget) | ||
| 2406 | (let ((visible (widget-value widget))) | ||
| 2407 | (if visible | ||
| 2408 | (insert "--------"))) | ||
| 2409 | (widget-default-create widget)) | ||
| 2410 | |||
| 2401 | (defun custom-group-value-create (widget) | 2411 | (defun custom-group-value-create (widget) |
| 2402 | "Insert a customize group for WIDGET in the current buffer." | 2412 | "Insert a customize group for WIDGET in the current buffer." |
| 2403 | (let ((state (widget-get widget :custom-state)) | 2413 | (let ((state (widget-get widget :custom-state)) |
| @@ -2979,6 +2989,9 @@ The format is suitable for use with `easy-menu-define'." | |||
| 2979 | :type 'hook | 2989 | :type 'hook |
| 2980 | :group 'custom-buffer ) | 2990 | :group 'custom-buffer ) |
| 2981 | 2991 | ||
| 2992 | (defun custom-state-buffer-message () | ||
| 2993 | (message "To set the value, invoke [State] and choose the Set operation")) | ||
| 2994 | |||
| 2982 | (defun custom-mode () | 2995 | (defun custom-mode () |
| 2983 | "Major mode for editing customization buffers. | 2996 | "Major mode for editing customization buffers. |
| 2984 | 2997 | ||
| @@ -3002,6 +3015,8 @@ if that value is non-nil." | |||
| 3002 | (use-local-map custom-mode-map) | 3015 | (use-local-map custom-mode-map) |
| 3003 | (easy-menu-add custom-mode-menu) | 3016 | (easy-menu-add custom-mode-menu) |
| 3004 | (make-local-variable 'custom-options) | 3017 | (make-local-variable 'custom-options) |
| 3018 | (make-local-hook 'widget-edit-hook) | ||
| 3019 | (add-hook 'widget-edit-hook 'custom-state-buffer-message nil t) | ||
| 3005 | (run-hooks 'custom-mode-hook)) | 3020 | (run-hooks 'custom-mode-hook)) |
| 3006 | 3021 | ||
| 3007 | ;;; The End. | 3022 | ;;; The End. |