summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/gv.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2020-12-14 16:16:01 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2020-12-14 16:16:01 -0500
commit485898c18b8ce665a6539ad6be6ccf1b8bece0c6 (patch)
tree8defa7a473e90d029a150d8efe9d7d0f5eb87595 /lisp/emacs-lisp/gv.el
parent071bfd9840b1048bdc4f2c461fe50bd33dc919e8 (diff)
downloademacs-485898c18b8ce665a6539ad6be6ccf1b8bece0c6.tar.gz
emacs-485898c18b8ce665a6539ad6be6ccf1b8bece0c6.tar.bz2
emacs-485898c18b8ce665a6539ad6be6ccf1b8bece0c6.zip
* lisp/emacs-lisp/gv.el (error): Allow it as a place
Diffstat (limited to 'lisp/emacs-lisp/gv.el')
-rw-r--r--lisp/emacs-lisp/gv.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 5470b8532fc..7ee5c47d116 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -504,6 +504,11 @@ The return value is the last VAL in the list.
(funcall do `(funcall (car ,gv))
(lambda (v) `(funcall (cdr ,gv) ,v))))))))
+(put 'error 'gv-expander
+ (lambda (do &rest args)
+ (funcall do `(error . ,args)
+ (lambda (v) `(progn ,v (error . ,args))))))
+
(defmacro gv-synthetic-place (getter setter)
"Special place described by its setter and getter.
GETTER and SETTER (typically obtained via `gv-letplace') get and