aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-12-16 14:12:21 -0500
committerStefan Monnier2013-12-16 14:12:21 -0500
commit39cb42c6213248c07f298be04c79b606be7d431d (patch)
treed01aac41fce54598eb1651aac095e7a487b8b25e
parent2f43a3ee6a4a8da9b03794f7d67410a11808da87 (diff)
downloademacs-39cb42c6213248c07f298be04c79b606be7d431d.tar.gz
emacs-39cb42c6213248c07f298be04c79b606be7d431d.zip
* lisp/emacs-lisp/gv.el (gv-ref): Mention lexbind restriction.
Fixes: debbugs:16153
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/emacs-lisp/gv.el5
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9ccc510ce1a..6b0b8fc67d8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12013-12-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/gv.el (gv-ref): Mention lexbind restriction (bug#16153).
4
12013-12-16 Teodor Zlatanov <tzz@lifelogs.com> 52013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
2 6
3 * progmodes/cfengine.el (cfengine3--current-word): Remove. 7 * progmodes/cfengine.el (cfengine3--current-word): Remove.
@@ -9,8 +13,8 @@
9 13
102013-12-16 Martin Rudalics <rudalics@gmx.at> 142013-12-16 Martin Rudalics <rudalics@gmx.at>
11 15
12 * window.el (display-buffer-below-selected): Bind 16 * window.el (display-buffer-below-selected):
13 split-height-threshold to 0 as suggested by Juri Linkov. 17 Bind split-height-threshold to 0 as suggested by Juri Linkov.
14 18
152013-12-16 Leo Liu <sdl.web@gmail.com> 192013-12-16 Leo Liu <sdl.web@gmail.com>
16 20
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.
454;;;###autoload 454;;;###autoload
455(defmacro gv-ref (place) 455(defmacro gv-ref (place)
456 "Return a reference to PLACE. 456 "Return a reference to PLACE.
457This is like the `&' operator of the C language." 457This is like the `&' operator of the C language.
458Note: this only works reliably with lexical binding mode, except for very
459simple PLACEs such as (function-symbol 'foo) which will also work in dynamic
460binding mode."
458 (gv-letplace (getter setter) place 461 (gv-letplace (getter setter) place
459 `(cons (lambda () ,getter) 462 `(cons (lambda () ,getter)
460 (lambda (gv--val) ,(funcall setter 'gv--val))))) 463 (lambda (gv--val) ,(funcall setter 'gv--val)))))