diff options
| author | Karl Heuer | 1997-12-04 05:49:21 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-12-04 05:49:21 +0000 |
| commit | d64478da0b0676f77831ca332ccb6a88c4b5e319 (patch) | |
| tree | c468f823158b7878e8e486e8b76c35677f9dbebd | |
| parent | 7bba18953ee1a3161d04d0174c92a87fabfa68a8 (diff) | |
| download | emacs-d64478da0b0676f77831ca332ccb6a88c4b5e319.tar.gz emacs-d64478da0b0676f77831ca332ccb6a88c4b5e319.zip | |
(custom-unlispify-remove-prefixes): Reference to
related variables added.
(custom-variable-default-form): New variable controlling default
display form for customization of variables.
(custom-variable): widget `:form' is nil before initialization.
(custom-variable-value-create): Initialize `:form' to
`custom-variable-default-form'.
(custom-face-default-form): New variable controlling default
display form for customization of faces.
(custom-face): widget `:form' is nil before initialization.
(custom-face-value-create): Initialize `:form' to
`custom-face-default-form'.
| -rw-r--r-- | lisp/cus-edit.el | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index e06207c53b7..cac6684cbbb 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1734,6 +1734,12 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | |||
| 1734 | "Face used for pushable variable tags." | 1734 | "Face used for pushable variable tags." |
| 1735 | :group 'custom-faces) | 1735 | :group 'custom-faces) |
| 1736 | 1736 | ||
| 1737 | (defcustom custom-variable-default-form 'edit | ||
| 1738 | "Default form of displaying variable values." | ||
| 1739 | :type '(choice (const edit) | ||
| 1740 | (const lisp)) | ||
| 1741 | :group 'custom-buffer) | ||
| 1742 | |||
| 1737 | (define-widget 'custom-variable 'custom | 1743 | (define-widget 'custom-variable 'custom |
| 1738 | "Customize variable." | 1744 | "Customize variable." |
| 1739 | :format "%v" | 1745 | :format "%v" |
| @@ -1742,7 +1748,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." | |||
| 1742 | :custom-category 'option | 1748 | :custom-category 'option |
| 1743 | :custom-state nil | 1749 | :custom-state nil |
| 1744 | :custom-menu 'custom-variable-menu-create | 1750 | :custom-menu 'custom-variable-menu-create |
| 1745 | :custom-form 'edit | 1751 | :custom-form nil ; defaults to value of `custom-variable-default-form' |
| 1746 | :value-create 'custom-variable-value-create | 1752 | :value-create 'custom-variable-value-create |
| 1747 | :action 'custom-variable-action | 1753 | :action 'custom-variable-action |
| 1748 | :custom-set 'custom-variable-set | 1754 | :custom-set 'custom-variable-set |
| @@ -1770,6 +1776,8 @@ Otherwise, look up symbol in `custom-guess-type-alist'." | |||
| 1770 | (defun custom-variable-value-create (widget) | 1776 | (defun custom-variable-value-create (widget) |
| 1771 | "Here is where you edit the variables value." | 1777 | "Here is where you edit the variables value." |
| 1772 | (custom-load-widget widget) | 1778 | (custom-load-widget widget) |
| 1779 | (unless (widget-get widget :custom-form) | ||
| 1780 | (widget-put widget :custom-form custom-variable-default-form)) | ||
| 1773 | (let* ((buttons (widget-get widget :buttons)) | 1781 | (let* ((buttons (widget-get widget :buttons)) |
| 1774 | (children (widget-get widget :children)) | 1782 | (children (widget-get widget :children)) |
| 1775 | (form (widget-get widget :custom-form)) | 1783 | (form (widget-get widget :custom-form)) |
| @@ -2170,6 +2178,13 @@ Match frames with dark backgrounds.") | |||
| 2170 | "Face used for face tags." | 2178 | "Face used for face tags." |
| 2171 | :group 'custom-faces) | 2179 | :group 'custom-faces) |
| 2172 | 2180 | ||
| 2181 | (defcustom custom-face-default-form 'selected | ||
| 2182 | "Default form of displaying face definition." | ||
| 2183 | :type '(choice (const all) | ||
| 2184 | (const selected) | ||
| 2185 | (const lisp)) | ||
| 2186 | :group 'custom-buffer) | ||
| 2187 | |||
| 2173 | (define-widget 'custom-face 'custom | 2188 | (define-widget 'custom-face 'custom |
| 2174 | "Customize face." | 2189 | "Customize face." |
| 2175 | :sample-face 'custom-face-tag-face | 2190 | :sample-face 'custom-face-tag-face |
| @@ -2179,7 +2194,7 @@ Match frames with dark backgrounds.") | |||
| 2179 | :value-create 'custom-face-value-create | 2194 | :value-create 'custom-face-value-create |
| 2180 | :action 'custom-face-action | 2195 | :action 'custom-face-action |
| 2181 | :custom-category 'face | 2196 | :custom-category 'face |
| 2182 | :custom-form 'selected | 2197 | :custom-form nil ; defaults to value of `custom-face-default-form' |
| 2183 | :custom-set 'custom-face-set | 2198 | :custom-set 'custom-face-set |
| 2184 | :custom-save 'custom-face-save | 2199 | :custom-save 'custom-face-save |
| 2185 | :custom-reset-current 'custom-redraw | 2200 | :custom-reset-current 'custom-redraw |
| @@ -2283,6 +2298,8 @@ Match frames with dark backgrounds.") | |||
| 2283 | (unless (eq state 'hidden) | 2298 | (unless (eq state 'hidden) |
| 2284 | (message "Creating face editor...") | 2299 | (message "Creating face editor...") |
| 2285 | (custom-load-widget widget) | 2300 | (custom-load-widget widget) |
| 2301 | (unless (widget-get widget :custom-form) | ||
| 2302 | (widget-put widget :custom-form custom-face-default-form)) | ||
| 2286 | (let* ((symbol (widget-value widget)) | 2303 | (let* ((symbol (widget-value widget)) |
| 2287 | (spec (or (get symbol 'saved-face) | 2304 | (spec (or (get symbol 'saved-face) |
| 2288 | (get symbol 'face-defface-spec) | 2305 | (get symbol 'face-defface-spec) |