From 485898c18b8ce665a6539ad6be6ccf1b8bece0c6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Dec 2020 16:16:01 -0500 Subject: [PATCH] * lisp/emacs-lisp/gv.el (error): Allow it as a place --- lisp/emacs-lisp/gv.el | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.2