diff options
| author | Chong Yidong | 2012-02-06 20:48:07 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-06 20:48:07 +0800 |
| commit | f2475f97b728ad7b4237b40600f3cb786c8fbce7 (patch) | |
| tree | ab3d3d9cf8a8044f37a9707a0ce29648efebc75e | |
| parent | 9a6dd7472a531b065e2f353b280755d49b50d813 (diff) | |
| download | emacs-f2475f97b728ad7b4237b40600f3cb786c8fbce7.tar.gz emacs-f2475f97b728ad7b4237b40600f3cb786c8fbce7.zip | |
* lisp/custom.el (defcustom): Another doc fix.
| -rw-r--r-- | lisp/custom.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index a879c7f76a0..2d880d23955 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -198,14 +198,14 @@ set to nil, as the value is no longer rogue." | |||
| 198 | (run-hooks 'custom-define-hook) | 198 | (run-hooks 'custom-define-hook) |
| 199 | symbol) | 199 | symbol) |
| 200 | 200 | ||
| 201 | (defmacro defcustom (symbol value doc &rest args) | 201 | (defmacro defcustom (symbol standard doc &rest args) |
| 202 | "Declare SYMBOL as a customizable variable that defaults to VALUE. | 202 | "Declare SYMBOL as a customizable variable. |
| 203 | SYMBOL is the variable name; it should not be quoted. | 203 | SYMBOL is the variable name; it should not be quoted. |
| 204 | VALUE is an expression specifying the variable's standard value. | 204 | STANDARD is an expression specifying the variable's standard |
| 205 | This expression should not be quoted. It is evaluated once by | 205 | value. It should not be quoted. It is evaluated once by |
| 206 | `defcustom', and the value is assigned to SYMBOL if the variable | 206 | `defcustom', and the value is assigned to SYMBOL if the variable |
| 207 | is unbound. The expression may also be re-evaluated by Customize | 207 | is unbound. The expression itself is also stored, so that |
| 208 | whenever it needs to get the variable's standard value. | 208 | Customize can re-evaluate it later to get the standard value. |
| 209 | DOC is the variable documentation. | 209 | DOC is the variable documentation. |
| 210 | 210 | ||
| 211 | The remaining arguments should have the form | 211 | The remaining arguments should have the form |
| @@ -324,14 +324,15 @@ for more information." | |||
| 324 | `(custom-declare-variable | 324 | `(custom-declare-variable |
| 325 | ',symbol | 325 | ',symbol |
| 326 | ,(if lexical-binding ;FIXME: This is not reliable, but is all we have. | 326 | ,(if lexical-binding ;FIXME: This is not reliable, but is all we have. |
| 327 | ;; The `default' arg should be an expression that evaluates to | 327 | ;; The STANDARD arg should be an expression that evaluates to |
| 328 | ;; the value to use. The use of `eval' for it is spread over | 328 | ;; the standard value. The use of `eval' for it is spread |
| 329 | ;; many different places and hence difficult to eliminate, yet | 329 | ;; over many different places and hence difficult to |
| 330 | ;; we want to make sure that the `value' expression is checked by the | 330 | ;; eliminate, yet we want to make sure that the `standard' |
| 331 | ;; byte-compiler, and that lexical-binding is obeyed, so quote the | 331 | ;; expression is checked by the byte-compiler, and that |
| 332 | ;; expression with `lambda' rather than with `quote'. | 332 | ;; lexical-binding is obeyed, so quote the expression with |
| 333 | `(list (lambda () ,value)) | 333 | ;; `lambda' rather than with `quote'. |
| 334 | `',value) | 334 | `(list (lambda () ,standard)) |
| 335 | `',standard) | ||
| 335 | ,doc | 336 | ,doc |
| 336 | ,@args)) | 337 | ,@args)) |
| 337 | 338 | ||