[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110798: Small doc updates for gen
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110798: Small doc updates for generalized variables |
Date: |
Tue, 06 Nov 2012 20:37:07 -0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110798
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Tue 2012-11-06 20:37:07 -0800
message:
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.
modified:
doc/lispref/ChangeLog
doc/lispref/variables.texi
doc/misc/ChangeLog
doc/misc/cl.texi
lisp/ChangeLog
lisp/emacs-lisp/gv.el
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2012-11-06 02:03:34 +0000
+++ b/doc/lispref/ChangeLog 2012-11-07 04:37:07 +0000
@@ -1,3 +1,8 @@
+2012-11-07 Glenn Morris <address@hidden>
+
+ * variables.texi (Adding Generalized Variables):
+ Update description of FIX-RETURN expansion.
+
2012-11-06 Glenn Morris <address@hidden>
* variables.texi (Setting Generalized Variables):
=== modified file 'doc/lispref/variables.texi'
--- a/doc/lispref/variables.texi 2012-11-06 08:02:25 +0000
+++ b/doc/lispref/variables.texi 2012-11-07 04:37:07 +0000
@@ -2089,8 +2089,13 @@
@code{setcar} returns the value that it set. If your @var{setter}
function does not return @var{value}, use a address@hidden value for
the @var{fix-return} argument of @code{gv-define-simple-setter}. This
-wraps the @code{setf} expansion in @code{(prog1 @var{value} @dots{})}
-so that it returns the correct result.
+expands into something equivalent to
address@hidden
+(let ((temp @var{value}))
+ (@var{setter} @address@hidden temp)
+ temp)
address@hidden example
+so ensuring that it returns the correct result.
@end defmac
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2012-11-06 02:49:57 +0000
+++ b/doc/misc/ChangeLog 2012-11-07 04:37:07 +0000
@@ -1,3 +1,8 @@
+2012-11-07 Glenn Morris <address@hidden>
+
+ * cl.texi (Obsolete Setf Customization):
+ Revert defsetf example to the more correct let rather than prog1.
+
2012-11-06 Glenn Morris <address@hidden>
* cl.texi (Overview): Mention EIEIO here, as well as the appendix.
=== modified file 'doc/misc/cl.texi'
--- a/doc/misc/cl.texi 2012-11-06 02:49:57 +0000
+++ b/doc/misc/cl.texi 2012-11-07 04:37:07 +0000
@@ -4950,9 +4950,8 @@
@end defmac
@defmac defsetf access-fn update-fn
-This is the simpler of two @code{defsetf} forms, and is entirely
-obsolete, being replaced by @code{gv-define-simple-setter} in Emacs
-24.3.
+This is the simpler of two @code{defsetf} forms, and is
+replaced by @code{gv-define-simple-setter} in Emacs 24.3.
@xref{Adding Generalized Variables,,,elisp,GNU Emacs Lisp Reference Manual}.
Where @var{access-fn} is the name of a function that accesses a place,
@@ -4983,8 +4982,9 @@
something more like
@example
-(prog1 @var{value}
- (@var{update-fn} @var{arg1} @var{arg2} @var{arg3} @var{value}))
+(let ((temp @var{value}))
+ (@var{update-fn} @var{arg1} @var{arg2} @var{arg3} temp)
+ temp)
@end example
Some examples are:
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-07 03:39:33 +0000
+++ b/lisp/ChangeLog 2012-11-07 04:37:07 +0000
@@ -1,3 +1,8 @@
+2012-11-07 Glenn Morris <address@hidden>
+
+ * emacs-lisp/gv.el (gv-letplace): Fix doc typo.
+ (gv-define-simple-setter): Update doc of `fix-return'.
+
2012-11-07 Stefan Monnier <address@hidden>
* emacs-lisp/gv.el (gv-define-simple-setter): Don't evaluate `val'
=== modified file 'lisp/emacs-lisp/gv.el'
--- a/lisp/emacs-lisp/gv.el 2012-11-07 03:39:33 +0000
+++ b/lisp/emacs-lisp/gv.el 2012-11-07 04:37:07 +0000
@@ -111,7 +111,7 @@
GETTER will be bound to a copyable expression that returns the value
of PLACE.
SETTER will be bound to a function that takes an expression V and returns
-and new expression that sets PLACE to V.
+a new expression that sets PLACE to V.
BODY should return some Elisp expression E manipulating PLACE via GETTER
and SETTER.
The returned value will then be an Elisp expression that first evaluates
@@ -209,8 +209,12 @@
This macro is an easy-to-use substitute for `gv-define-expander' that works
well for simple place forms. Assignments of VAL to (NAME ARGS...) are
turned into calls of the form (SETTER ARGS... VAL).
+
If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and
-instead the assignment is turned into (prog1 VAL (SETTER ARGS... VAL))
+instead the assignment is turned into something equivalent to
+ \(let ((temp VAL))
+ (SETTER ARGS... temp)
+ temp)
so as to preserve the semantics of `setf'."
(declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
`(gv-define-setter ,name (val &rest args)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110798: Small doc updates for generalized variables,
Glenn Morris <=