diff options
| author | Juanma Barranquero | 2014-03-19 00:31:17 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-19 00:31:17 +0100 |
| commit | 6b88e570d87bbf8e3e36f6cb25a3791d047e8c35 (patch) | |
| tree | b112a3e1599406ab812dc1c42c01a86443db72c4 | |
| parent | 4d99c93d27d47ff9f5fb941fe92e3b4b9cf5cf43 (diff) | |
| download | emacs-6b88e570d87bbf8e3e36f6cb25a3791d047e8c35.tar.gz emacs-6b88e570d87bbf8e3e36f6cb25a3791d047e8c35.zip | |
Recommend not modifying :set's value arg in defcustom (bug#16755).
* doc/lispref/customize.texi (Variable Definitions):
* lisp/custom.el (defcustom): Recommend avoiding
destructive modification of the value argument of :set.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/customize.texi | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/custom.el | 7 |
4 files changed, 17 insertions, 5 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 723bd1188c6..2749a521c9a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * customize.texi (Variable Definitions): Recommend avoiding | ||
| 4 | destructive modification of the value argument of :set (bug#16755). | ||
| 5 | |||
| 1 | 2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * modes.texi (Auto-Indentation): Mention electric-indent variables. | 8 | * modes.texi (Auto-Indentation): Mention electric-indent variables. |
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 094beef01ec..0c6497fb4ef 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi | |||
| @@ -353,8 +353,9 @@ option when using the Customize interface. The function | |||
| 353 | @var{setfunction} should take two arguments, a symbol (the option | 353 | @var{setfunction} should take two arguments, a symbol (the option |
| 354 | name) and the new value, and should do whatever is necessary to update | 354 | name) and the new value, and should do whatever is necessary to update |
| 355 | the value properly for this option (which may not mean simply setting | 355 | the value properly for this option (which may not mean simply setting |
| 356 | the option as a Lisp variable). The default for @var{setfunction} is | 356 | the option as a Lisp variable); preferably, though, it should not |
| 357 | @code{set-default}. | 357 | modify its value argument destructively. The default for |
| 358 | @var{setfunction} is @code{set-default}. | ||
| 358 | 359 | ||
| 359 | If you specify this keyword, the variable's documentation string | 360 | If you specify this keyword, the variable's documentation string |
| 360 | should describe how to do the same job in hand-written Lisp code. | 361 | should describe how to do the same job in hand-written Lisp code. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70b557ad36b..4308d4085fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-18 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * custom.el (defcustom): Doc fix: recommend avoiding destructive | ||
| 4 | modification of the value argument of :set (bug#16755). | ||
| 5 | |||
| 1 | 2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * simple.el (newline-and-indent): Do autofill (bug#17031). | 8 | * simple.el (newline-and-indent): Do autofill (bug#17031). |
diff --git a/lisp/custom.el b/lisp/custom.el index 09431c454ec..c30ad7cb213 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -232,9 +232,10 @@ The following keywords are meaningful: | |||
| 232 | given in the `defcustom' call. The default is | 232 | given in the `defcustom' call. The default is |
| 233 | `custom-initialize-reset'. | 233 | `custom-initialize-reset'. |
| 234 | :set VALUE should be a function to set the value of the symbol | 234 | :set VALUE should be a function to set the value of the symbol |
| 235 | when using the Customize user interface. | 235 | when using the Customize user interface. It takes two arguments, |
| 236 | It takes two arguments, the symbol to set and the value to | 236 | the symbol to set and the value to give it. The function should |
| 237 | give it. The default choice of function is `set-default'. | 237 | not modify its value argument destructively. The default choice |
| 238 | of function is `set-default'. | ||
| 238 | :get VALUE should be a function to extract the value of symbol. | 239 | :get VALUE should be a function to extract the value of symbol. |
| 239 | The function takes one argument, a symbol, and should return | 240 | The function takes one argument, a symbol, and should return |
| 240 | the current value for that symbol. The default choice of function | 241 | the current value for that symbol. The default choice of function |