Commit 6b88e570 authored by Juanma Barranquero's avatar Juanma Barranquero

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.
parent 4d99c93d
2014-03-18 Juanma Barranquero <lekktu@gmail.com>
* customize.texi (Variable Definitions): Recommend avoiding
destructive modification of the value argument of :set (bug#16755).
2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* modes.texi (Auto-Indentation): Mention electric-indent variables.
......
......@@ -353,8 +353,9 @@ option when using the Customize interface. The function
@var{setfunction} should take two arguments, a symbol (the option
name) and the new value, and should do whatever is necessary to update
the value properly for this option (which may not mean simply setting
the option as a Lisp variable). The default for @var{setfunction} is
@code{set-default}.
the option as a Lisp variable); preferably, though, it should not
modify its value argument destructively. The default for
@var{setfunction} is @code{set-default}.
If you specify this keyword, the variable's documentation string
should describe how to do the same job in hand-written Lisp code.
......
2014-03-18 Juanma Barranquero <lekktu@gmail.com>
* custom.el (defcustom): Doc fix: recommend avoiding destructive
modification of the value argument of :set (bug#16755).
2014-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (newline-and-indent): Do autofill (bug#17031).
......
......@@ -232,9 +232,10 @@ The following keywords are meaningful:
given in the `defcustom' call. The default is
`custom-initialize-reset'.
:set VALUE should be a function to set the value of the symbol
when using the Customize user interface.
It takes two arguments, the symbol to set and the value to
give it. The default choice of function is `set-default'.
when using the Customize user interface. It takes two arguments,
the symbol to set and the value to give it. The function should
not modify its value argument destructively. The default choice
of function is `set-default'.
:get VALUE should be a function to extract the value of symbol.
The function takes one argument, a symbol, and should return
the current value for that symbol. The default choice of function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment