emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 485898c: * lisp/emacs-lisp/gv.el (error): Allow it as a place


From: Stefan Monnier
Subject: master 485898c: * lisp/emacs-lisp/gv.el (error): Allow it as a place
Date: Mon, 14 Dec 2020 16:16:07 -0500 (EST)

branch: master
commit 485898c18b8ce665a6539ad6be6ccf1b8bece0c6
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * 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 5470b85..7ee5c47 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]