aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2012-11-06 20:37:07 -0800
committerGlenn Morris2012-11-06 20:37:07 -0800
commit2ee1d59f5bea4a206595d621dcb63477461b7155 (patch)
tree11e77e75f9dd809295149af72e46b8044675b899 /lisp
parentb715ed4447b025d713fc68a7af3728c2d463974b (diff)
downloademacs-2ee1d59f5bea4a206595d621dcb63477461b7155.tar.gz
emacs-2ee1d59f5bea4a206595d621dcb63477461b7155.zip
Small doc updates for generalized variables
* lisp/emacs-lisp/gv.el (gv-letplace): Fix doc typo. (gv-define-simple-setter): Update doc of `fix-return'. * doc/lispref/variables.texi (Adding Generalized Variables): Update description of FIX-RETURN expansion. * doc/misc/cl.texi (Obsolete Setf Customization): Revert defsetf example to the more correct let rather than prog1.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/gv.el8
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 187ff2d7e1d..cfd79fc57ef 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-11-07 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/gv.el (gv-letplace): Fix doc typo.
4 (gv-define-simple-setter): Update doc of `fix-return'.
5
12012-11-07 Stefan Monnier <monnier@iro.umontreal.ca> 62012-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val' 8 * emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val'
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index a0c412a9504..145c48c670e 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -111,7 +111,7 @@ DO must return an Elisp expression."
111GETTER will be bound to a copyable expression that returns the value 111GETTER will be bound to a copyable expression that returns the value
112of PLACE. 112of PLACE.
113SETTER will be bound to a function that takes an expression V and returns 113SETTER will be bound to a function that takes an expression V and returns
114and new expression that sets PLACE to V. 114a new expression that sets PLACE to V.
115BODY should return some Elisp expression E manipulating PLACE via GETTER 115BODY should return some Elisp expression E manipulating PLACE via GETTER
116and SETTER. 116and SETTER.
117The returned value will then be an Elisp expression that first evaluates 117The returned value will then be an Elisp expression that first evaluates
@@ -209,8 +209,12 @@ to be pure and copyable. Example use:
209This macro is an easy-to-use substitute for `gv-define-expander' that works 209This macro is an easy-to-use substitute for `gv-define-expander' that works
210well for simple place forms. Assignments of VAL to (NAME ARGS...) are 210well for simple place forms. Assignments of VAL to (NAME ARGS...) are
211turned into calls of the form (SETTER ARGS... VAL). 211turned into calls of the form (SETTER ARGS... VAL).
212
212If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and 213If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and
213instead the assignment is turned into (prog1 VAL (SETTER ARGS... VAL)) 214instead the assignment is turned into something equivalent to
215 \(let ((temp VAL))
216 (SETTER ARGS... temp)
217 temp)
214so as to preserve the semantics of `setf'." 218so as to preserve the semantics of `setf'."
215 (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp))) 219 (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
216 `(gv-define-setter ,name (val &rest args) 220 `(gv-define-setter ,name (val &rest args)