diff options
| author | Richard M. Stallman | 2005-01-06 03:58:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-01-06 03:58:33 +0000 |
| commit | f1a262ed1464b9f0c5503ca27e57e5d7f0efba50 (patch) | |
| tree | 704b6dda906d64f0438f51de1407bb6f5652ac94 | |
| parent | e0e76ab914bc4d9e4933e11c622a43981be2a141 (diff) | |
| download | emacs-f1a262ed1464b9f0c5503ca27e57e5d7f0efba50.tar.gz emacs-f1a262ed1464b9f0c5503ca27e57e5d7f0efba50.zip | |
(custom-set-variables, custom-theme-set-variables): Clarify documentation.
| -rw-r--r-- | lisp/custom.el | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 2ddd7ceb943..5fea8c5d12d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -710,44 +710,46 @@ in every Customization buffer.") | |||
| 710 | (put 'custom-local-buffer 'permanent-local t) | 710 | (put 'custom-local-buffer 'permanent-local t) |
| 711 | 711 | ||
| 712 | (defun custom-set-variables (&rest args) | 712 | (defun custom-set-variables (&rest args) |
| 713 | "Initialize variables according to user preferences. | 713 | "Install user customizations of variable values specified in ARGS. |
| 714 | The settings are registered as theme `user'. | 714 | These settings are registered as theme `user'. |
| 715 | The arguments should each be a list of the form: | 715 | The arguments should each be a list of the form: |
| 716 | 716 | ||
| 717 | (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) | 717 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) |
| 718 | 718 | ||
| 719 | The unevaluated VALUE is stored as the saved value for SYMBOL. | 719 | This stores EXP (without evaluating it) as the saved value for SYMBOL. |
| 720 | If NOW is present and non-nil, VALUE is also evaluated and bound as | 720 | If NOW is present and non-nil, then also evaluate EXP and set |
| 721 | the default value for the SYMBOL. | 721 | the default value for the SYMBOL to the value of EXP. |
| 722 | 722 | ||
| 723 | REQUEST is a list of features we must 'require for SYMBOL. | 723 | REQUEST is a list of features we must require in order to |
| 724 | handle SYMBOL properly. | ||
| 724 | COMMENT is a comment string about SYMBOL." | 725 | COMMENT is a comment string about SYMBOL." |
| 725 | (apply 'custom-theme-set-variables 'user args)) | 726 | (apply 'custom-theme-set-variables 'user args)) |
| 726 | 727 | ||
| 727 | (defun custom-theme-set-variables (theme &rest args) | 728 | (defun custom-theme-set-variables (theme &rest args) |
| 728 | "Initialize variables according to settings specified by args. | 729 | "Initialize variables for theme THEME according to settings in ARGS. |
| 729 | Records the settings as belonging to THEME. | 730 | Each of the arguments in ARGS should be a list of this form: |
| 730 | 731 | ||
| 731 | The arguments should be a list where each entry has the form: | 732 | (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) |
| 732 | 733 | ||
| 733 | (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) | 734 | This stores EXP (without evaluating it) as the saved value for SYMBOL. |
| 735 | If NOW is present and non-nil, then also evaluate EXP and set | ||
| 736 | the default value for the SYMBOL to the value of EXP. | ||
| 734 | 737 | ||
| 735 | The unevaluated VALUE is stored as the saved value for SYMBOL. | 738 | REQUEST is a list of features we must require in order to |
| 736 | If NOW is present and non-nil, VALUE is also evaluated and bound as | 739 | handle SYMBOL properly. |
| 737 | the default value for the SYMBOL. | ||
| 738 | REQUEST is a list of features we must 'require for SYMBOL. | ||
| 739 | COMMENT is a comment string about SYMBOL. | 740 | COMMENT is a comment string about SYMBOL. |
| 740 | 741 | ||
| 741 | Several properties of THEME and SYMBOL are used in the process: | 742 | Several properties of THEME and SYMBOL are used in the process: |
| 742 | 743 | ||
| 743 | If THEME property `theme-immediate' is non-nil, this is equivalent of | 744 | If THEME's property `theme-immediate' is non-nil, this is equivalent of |
| 744 | providing the NOW argument to all symbols in the argument list: SYMBOL | 745 | providing the NOW argument to all symbols in the argument list: |
| 745 | is bound to the evaluated VALUE. The only difference is SYMBOL property | 746 | evaluate each EXP and set the corresponding SYMBOL. However, |
| 747 | there's a difference in the handling of SYMBOL's property | ||
| 746 | `force-value': if NOW is non-nil, SYMBOL's property `force-value' is set to | 748 | `force-value': if NOW is non-nil, SYMBOL's property `force-value' is set to |
| 747 | the symbol `rogue', else if THEME's property `theme-immediate' is non-nil, | 749 | the symbol `rogue', else if THEME's property `theme-immediate' is non-nil, |
| 748 | FACE's property `force-face' is set to the symbol `immediate'. | 750 | SYMBOL's property `force-value' is set to the symbol `immediate'. |
| 749 | 751 | ||
| 750 | VALUE itself is saved unevaluated as SYMBOL property `saved-value' and | 752 | EXP itself is saved unevaluated as SYMBOL property `saved-value' and |
| 751 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." | 753 | in SYMBOL's list property `theme-value' \(using `custom-push-theme')." |
| 752 | (custom-check-theme theme) | 754 | (custom-check-theme theme) |
| 753 | (let ((immediate (get theme 'theme-immediate))) | 755 | (let ((immediate (get theme 'theme-immediate))) |