84 |
not already loaded. |
not already loaded. |
85 |
|
|
86 |
@item :require @var{feature} |
@item :require @var{feature} |
87 |
Require feature @var{feature} (a symbol) when installing a value for |
Execute @code{(require '@var{feature})} when your saved customizations |
88 |
this item (an option or a face) that was saved using the customization |
set the value of this item. @var{feature} should be a symbol. |
|
feature. This is done by calling @code{require}. |
|
89 |
|
|
90 |
The most common reason to use @code{:require} is when a variable enables |
The most common reason to use @code{:require} is when a variable enables |
91 |
a feature such as a minor mode, and just setting the variable won't have |
a feature such as a minor mode, and just setting the variable won't have |
92 |
any effect unless the code which implements the mode is loaded. |
any effect unless the code which implements the mode is loaded. |
93 |
|
|
94 |
|
@item :version @var{version} |
95 |
|
This option specifies that the item was first introduced in Emacs |
96 |
|
version @var{version}, or that its default value was changed in that |
97 |
|
version. The value @var{version} must be a string. |
98 |
@end table |
@end table |
99 |
|
|
100 |
@node Group Definitions |
@node Group Definitions |
134 |
Useful widgets are @code{custom-variable} for a variable, |
Useful widgets are @code{custom-variable} for a variable, |
135 |
@code{custom-face} for a face, and @code{custom-group} for a group. |
@code{custom-face} for a face, and @code{custom-group} for a group. |
136 |
|
|
137 |
When a new group is introduced into Emacs, use this keyword in |
When you introduce a new group into Emacs, use the @code{:version} |
138 |
@code{defgroup}: |
keyword in the @code{defgroup}; then you need not use it for |
139 |
|
the individual members of the group. |
|
@table @code |
|
|
@item :version @var{version} |
|
|
This option specifies that the group was first introduced in Emacs |
|
|
version @var{version}. The value @var{version} must be a string. |
|
|
@end table |
|
|
|
|
|
Tag the group with a version like this when it is introduced, rather |
|
|
than the individual members (@pxref{Variable Definitions}). |
|
140 |
|
|
141 |
In addition to the common keywords (@pxref{Common Keywords}), you can |
In addition to the common keywords (@pxref{Common Keywords}), you can |
142 |
also use this keyword in @code{defgroup}: |
also use this keyword in @code{defgroup}: |
219 |
@code{hook}, @code{plist} and @code{alist}. See the definition of the |
@code{hook}, @code{plist} and @code{alist}. See the definition of the |
220 |
individual types for a description of how to use @code{:options}. |
individual types for a description of how to use @code{:options}. |
221 |
|
|
|
@item :version @var{version} |
|
|
This option specifies that the variable was first introduced, or its |
|
|
default value was changed, in Emacs version @var{version}. The value |
|
|
@var{version} must be a string. For example, |
|
|
|
|
|
@example |
|
|
(defcustom foo-max 34 |
|
|
"*Maximum number of foo's allowed." |
|
|
:type 'integer |
|
|
:group 'foo |
|
|
:version "20.3") |
|
|
@end example |
|
|
|
|
222 |
@item :set @var{setfunction} |
@item :set @var{setfunction} |
223 |
Specify @var{setfunction} as the way to change the value of this option. |
Specify @var{setfunction} as the way to change the value of this |
224 |
The function @var{setfunction} should take two arguments, a symbol and |
option. The function @var{setfunction} should take two arguments, a |
225 |
the new value, and should do whatever is necessary to update the value |
symbol (the option name) and the new value, and should do whatever is |
226 |
properly for this option (which may not mean simply setting the option |
necessary to update the value properly for this option (which may not |
227 |
as a Lisp variable). The default for @var{setfunction} is |
mean simply setting the option as a Lisp variable). The default for |
228 |
@code{set-default}. |
@var{setfunction} is @code{set-default}. |
229 |
|
|
230 |
@item :get @var{getfunction} |
@item :get @var{getfunction} |
231 |
Specify @var{getfunction} as the way to extract the value of this |
Specify @var{getfunction} as the way to extract the value of this |
241 |
that really is stored in a Lisp variable. |
that really is stored in a Lisp variable. |
242 |
|
|
243 |
@item :initialize @var{function} |
@item :initialize @var{function} |
244 |
@var{function} should be a function used to initialize the variable when |
@var{function} should be a function used to initialize the variable |
245 |
the @code{defcustom} is evaluated. It should take two arguments, the |
when the @code{defcustom} is evaluated. It should take two arguments, |
246 |
symbol and value. Here are some predefined functions meant for use in |
the option name (a symbol) and the value. Here are some predefined |
247 |
this way: |
functions meant for use in this way: |
248 |
|
|
249 |
@table @code |
@table @code |
250 |
@item custom-initialize-set |
@item custom-initialize-set |