diff options
| author | Richard M. Stallman | 2005-03-08 03:06:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-03-08 03:06:04 +0000 |
| commit | 937dbf8c44ef25f3453372a4ebe6e3708d41095b (patch) | |
| tree | edf0b7abf7589d840e42df79f532cc6d61bc80e6 | |
| parent | 2634c6e41abdbdff6f61be884aa7f921e82c0885 (diff) | |
| download | emacs-937dbf8c44ef25f3453372a4ebe6e3708d41095b.tar.gz emacs-937dbf8c44ef25f3453372a4ebe6e3708d41095b.zip | |
(Common Keywords): Clarify :require. Mention :version here.
(Variable Definitions, Group Definitions): Not here.
(Variable Definitions): Clarify symbol arg to :initialize and :set fns.
| -rw-r--r-- | lispref/customize.texi | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/lispref/customize.texi b/lispref/customize.texi index 225a487af9b..a1a61ab6b09 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi | |||
| @@ -84,13 +84,17 @@ item. Loading is done with @code{load-library}, and only if the file is | |||
| 84 | not already loaded. | 84 | not already loaded. |
| 85 | 85 | ||
| 86 | @item :require @var{feature} | 86 | @item :require @var{feature} |
| 87 | Require feature @var{feature} (a symbol) when installing a value for | 87 | Execute @code{(require '@var{feature})} when your saved customizations |
| 88 | this item (an option or a face) that was saved using the customization | 88 | set the value of this item. @var{feature} should be a symbol. |
| 89 | feature. This is done by calling @code{require}. | ||
| 90 | 89 | ||
| 91 | The most common reason to use @code{:require} is when a variable enables | 90 | The most common reason to use @code{:require} is when a variable enables |
| 92 | a feature such as a minor mode, and just setting the variable won't have | 91 | a feature such as a minor mode, and just setting the variable won't have |
| 93 | any effect unless the code which implements the mode is loaded. | 92 | 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. | ||
| 94 | @end table | 98 | @end table |
| 95 | 99 | ||
| 96 | @node Group Definitions | 100 | @node Group Definitions |
| @@ -130,17 +134,9 @@ is a symbol, and @var{widget} is a widget type for editing that symbol. | |||
| 130 | Useful widgets are @code{custom-variable} for a variable, | 134 | Useful widgets are @code{custom-variable} for a variable, |
| 131 | @code{custom-face} for a face, and @code{custom-group} for a group. | 135 | @code{custom-face} for a face, and @code{custom-group} for a group. |
| 132 | 136 | ||
| 133 | When a new group is introduced into Emacs, use this keyword in | 137 | When you introduce a new group into Emacs, use the @code{:version} |
| 134 | @code{defgroup}: | 138 | keyword in the @code{defgroup}; then you need not use it for |
| 135 | 139 | the individual members of the group. | |
| 136 | @table @code | ||
| 137 | @item :version @var{version} | ||
| 138 | This option specifies that the group was first introduced in Emacs | ||
| 139 | version @var{version}. The value @var{version} must be a string. | ||
| 140 | @end table | ||
| 141 | |||
| 142 | Tag the group with a version like this when it is introduced, rather | ||
| 143 | than the individual members (@pxref{Variable Definitions}). | ||
| 144 | 140 | ||
| 145 | In addition to the common keywords (@pxref{Common Keywords}), you can | 141 | In addition to the common keywords (@pxref{Common Keywords}), you can |
| 146 | also use this keyword in @code{defgroup}: | 142 | also use this keyword in @code{defgroup}: |
| @@ -223,26 +219,13 @@ This is meaningful only for certain types, currently including | |||
| 223 | @code{hook}, @code{plist} and @code{alist}. See the definition of the | 219 | @code{hook}, @code{plist} and @code{alist}. See the definition of the |
| 224 | individual types for a description of how to use @code{:options}. | 220 | individual types for a description of how to use @code{:options}. |
| 225 | 221 | ||
| 226 | @item :version @var{version} | ||
| 227 | This option specifies that the variable was first introduced, or its | ||
| 228 | default value was changed, in Emacs version @var{version}. The value | ||
| 229 | @var{version} must be a string. For example, | ||
| 230 | |||
| 231 | @example | ||
| 232 | (defcustom foo-max 34 | ||
| 233 | "*Maximum number of foo's allowed." | ||
| 234 | :type 'integer | ||
| 235 | :group 'foo | ||
| 236 | :version "20.3") | ||
| 237 | @end example | ||
| 238 | |||
| 239 | @item :set @var{setfunction} | 222 | @item :set @var{setfunction} |
| 240 | Specify @var{setfunction} as the way to change the value of this option. | 223 | Specify @var{setfunction} as the way to change the value of this |
| 241 | The function @var{setfunction} should take two arguments, a symbol and | 224 | option. The function @var{setfunction} should take two arguments, a |
| 242 | the new value, and should do whatever is necessary to update the value | 225 | symbol (the option name) and the new value, and should do whatever is |
| 243 | properly for this option (which may not mean simply setting the option | 226 | necessary to update the value properly for this option (which may not |
| 244 | as a Lisp variable). The default for @var{setfunction} is | 227 | mean simply setting the option as a Lisp variable). The default for |
| 245 | @code{set-default}. | 228 | @var{setfunction} is @code{set-default}. |
| 246 | 229 | ||
| 247 | @item :get @var{getfunction} | 230 | @item :get @var{getfunction} |
| 248 | Specify @var{getfunction} as the way to extract the value of this | 231 | Specify @var{getfunction} as the way to extract the value of this |
| @@ -258,10 +241,10 @@ is almost surely a mistake to specify @code{getfunction} for a value | |||
| 258 | that really is stored in a Lisp variable. | 241 | that really is stored in a Lisp variable. |
| 259 | 242 | ||
| 260 | @item :initialize @var{function} | 243 | @item :initialize @var{function} |
| 261 | @var{function} should be a function used to initialize the variable when | 244 | @var{function} should be a function used to initialize the variable |
| 262 | the @code{defcustom} is evaluated. It should take two arguments, the | 245 | when the @code{defcustom} is evaluated. It should take two arguments, |
| 263 | symbol and value. Here are some predefined functions meant for use in | 246 | the option name (a symbol) and the value. Here are some predefined |
| 264 | this way: | 247 | functions meant for use in this way: |
| 265 | 248 | ||
| 266 | @table @code | 249 | @table @code |
| 267 | @item custom-initialize-set | 250 | @item custom-initialize-set |