1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 00:00:39 -08:00

* lisp/emacs-lisp/gv.el (gv-ref): Mention lexbind restriction.

Fixes: debbugs:16153
This commit is contained in:
Stefan Monnier 2013-12-16 14:12:21 -05:00
parent 2f43a3ee6a
commit 39cb42c621
2 changed files with 10 additions and 3 deletions

View file

@ -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)))))