diff options
| author | Chong Yidong | 2010-10-16 16:36:20 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-10-16 16:36:20 -0400 |
| commit | 647bc5022ff4fd7ef72d0cb66d9659af252b38df (patch) | |
| tree | fce772973ca243b41b38393664a24b4ca6bd978b /lisp/cus-theme.el | |
| parent | 782b5e8d92668cc6d434c836d076e26db1cab7c1 (diff) | |
| download | emacs-647bc5022ff4fd7ef72d0cb66d9659af252b38df.tar.gz emacs-647bc5022ff4fd7ef72d0cb66d9659af252b38df.zip | |
Allow hiding of modified custom widgets.
* cus-edit.el (custom-variable, custom-face): Combine the
:inhibit-magic and :display-style properties into a single
:custom-style property.
(custom-toggle-hide-variable, custom-toggle-hide-face): New
functions. If hiding an edited value, save it to :shown-value.
(custom-variable-value-create, custom-face-value-create): Use
them.
(custom-magic-reset): Allow magic property to be unset.
* cus-theme.el (custom-theme-add-var-1)
(custom-theme-add-face-1): Use the :custom-style property.
* custom.el: (custom-theme-load-path): Doc fix.
Diffstat (limited to 'lisp/cus-theme.el')
| -rw-r--r-- | lisp/cus-theme.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 34a03539719..4295fa75206 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | map) | 41 | map) |
| 42 | "Keymap for `custom-new-theme-mode'.") | 42 | "Keymap for `custom-new-theme-mode'.") |
| 43 | 43 | ||
| 44 | (define-derived-mode custom-new-theme-mode nil "Cus-Theme" | 44 | (define-derived-mode custom-new-theme-mode nil "Custom-Theme" |
| 45 | "Major mode for editing Custom themes. | 45 | "Major mode for editing Custom themes. |
| 46 | Do not call this mode function yourself. It is meant for internal use." | 46 | Do not call this mode function yourself. It is meant for internal use." |
| 47 | (use-local-map custom-new-theme-mode-map) | 47 | (use-local-map custom-new-theme-mode-map) |
| @@ -214,7 +214,7 @@ interactively, this defaults to the current value of VAR." | |||
| 214 | :notify 'ignore | 214 | :notify 'ignore |
| 215 | :custom-level 0 | 215 | :custom-level 0 |
| 216 | :custom-state 'hidden | 216 | :custom-state 'hidden |
| 217 | :inhibit-magic t)) | 217 | :custom-style 'simple)) |
| 218 | custom-theme-variables) | 218 | custom-theme-variables) |
| 219 | (widget-insert " ")) | 219 | (widget-insert " ")) |
| 220 | 220 | ||
| @@ -250,9 +250,8 @@ SPEC, if non-nil, should be a face spec to which to set the widget." | |||
| 250 | :documentation-shown t | 250 | :documentation-shown t |
| 251 | :value symbol | 251 | :value symbol |
| 252 | :custom-state 'hidden | 252 | :custom-state 'hidden |
| 253 | :display-style 'concise | 253 | :custom-style 'simple |
| 254 | :shown-value spec | 254 | :shown-value spec |
| 255 | :inhibit-magic t | ||
| 256 | :sample-indent 34)) | 255 | :sample-indent 34)) |
| 257 | custom-theme-faces) | 256 | custom-theme-faces) |
| 258 | (widget-insert " ")) | 257 | (widget-insert " ")) |
| @@ -476,7 +475,7 @@ It includes all faces in list FACES." | |||
| 476 | map) | 475 | map) |
| 477 | "Keymap for `custom-theme-choose-mode'.") | 476 | "Keymap for `custom-theme-choose-mode'.") |
| 478 | 477 | ||
| 479 | (define-derived-mode custom-theme-choose-mode nil "Cus-Theme" | 478 | (define-derived-mode custom-theme-choose-mode nil "Themes" |
| 480 | "Major mode for selecting Custom themes. | 479 | "Major mode for selecting Custom themes. |
| 481 | Do not call this mode function yourself. It is meant for internal use." | 480 | Do not call this mode function yourself. It is meant for internal use." |
| 482 | (use-local-map custom-theme-choose-mode-map) | 481 | (use-local-map custom-theme-choose-mode-map) |