summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/gv.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-12-16 14:12:21 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-12-16 14:12:21 -0500
commit39cb42c6213248c07f298be04c79b606be7d431d (patch)
treed01aac41fce54598eb1651aac095e7a487b8b25e /lisp/emacs-lisp/gv.el
parent2f43a3ee6a4a8da9b03794f7d67410a11808da87 (diff)
downloademacs-39cb42c6213248c07f298be04c79b606be7d431d.tar.gz
* lisp/emacs-lisp/gv.el (gv-ref): Mention lexbind restriction.
Fixes: debbugs:16153
Diffstat (limited to 'lisp/emacs-lisp/gv.el')
-rw-r--r--lisp/emacs-lisp/gv.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 1a3800597a6..47ab36c0531 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -454,7 +454,10 @@ The return value is the last VAL in the list.
;;;###autoload
(defmacro gv-ref (place)
"Return a reference to PLACE.
-This is like the `&' operator of the C language."
+This is like the `&' operator of the C language.
+Note: this only works reliably with lexical binding mode, except for very
+simple PLACEs such as (function-symbol 'foo) which will also work in dynamic
+binding mode."
(gv-letplace (getter setter) place
`(cons (lambda () ,getter)
(lambda (gv--val) ,(funcall setter 'gv--val)))))