aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-01-06 03:58:33 +0000
committerRichard M. Stallman2005-01-06 03:58:33 +0000
commitf1a262ed1464b9f0c5503ca27e57e5d7f0efba50 (patch)
tree704b6dda906d64f0438f51de1407bb6f5652ac94
parente0e76ab914bc4d9e4933e11c622a43981be2a141 (diff)
downloademacs-f1a262ed1464b9f0c5503ca27e57e5d7f0efba50.tar.gz
emacs-f1a262ed1464b9f0c5503ca27e57e5d7f0efba50.zip
(custom-set-variables, custom-theme-set-variables): Clarify documentation.
-rw-r--r--lisp/custom.el42
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.
714The settings are registered as theme `user'. 714These settings are registered as theme `user'.
715The arguments should each be a list of the form: 715The 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
719The unevaluated VALUE is stored as the saved value for SYMBOL. 719This stores EXP (without evaluating it) as the saved value for SYMBOL.
720If NOW is present and non-nil, VALUE is also evaluated and bound as 720If NOW is present and non-nil, then also evaluate EXP and set
721the default value for the SYMBOL. 721the default value for the SYMBOL to the value of EXP.
722 722
723REQUEST is a list of features we must 'require for SYMBOL. 723REQUEST is a list of features we must require in order to
724handle SYMBOL properly.
724COMMENT is a comment string about SYMBOL." 725COMMENT 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.
729Records the settings as belonging to THEME. 730Each of the arguments in ARGS should be a list of this form:
730 731
731The 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]]]) 734This stores EXP (without evaluating it) as the saved value for SYMBOL.
735If NOW is present and non-nil, then also evaluate EXP and set
736the default value for the SYMBOL to the value of EXP.
734 737
735The unevaluated VALUE is stored as the saved value for SYMBOL. 738REQUEST is a list of features we must require in order to
736If NOW is present and non-nil, VALUE is also evaluated and bound as 739handle SYMBOL properly.
737the default value for the SYMBOL.
738REQUEST is a list of features we must 'require for SYMBOL.
739COMMENT is a comment string about SYMBOL. 740COMMENT is a comment string about SYMBOL.
740 741
741Several properties of THEME and SYMBOL are used in the process: 742Several properties of THEME and SYMBOL are used in the process:
742 743
743If THEME property `theme-immediate' is non-nil, this is equivalent of 744If THEME's property `theme-immediate' is non-nil, this is equivalent of
744providing the NOW argument to all symbols in the argument list: SYMBOL 745providing the NOW argument to all symbols in the argument list:
745is bound to the evaluated VALUE. The only difference is SYMBOL property 746evaluate each EXP and set the corresponding SYMBOL. However,
747there'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
747the symbol `rogue', else if THEME's property `theme-immediate' is non-nil, 749the symbol `rogue', else if THEME's property `theme-immediate' is non-nil,
748FACE's property `force-face' is set to the symbol `immediate'. 750SYMBOL's property `force-value' is set to the symbol `immediate'.
749 751
750VALUE itself is saved unevaluated as SYMBOL property `saved-value' and 752EXP itself is saved unevaluated as SYMBOL property `saved-value' and
751in SYMBOL's list property `theme-value' \(using `custom-push-theme')." 753in 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)))