[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1a88a28ace 1/4: * lisp/subr.el (with-demoted-errors): Better mess
From: |
Mattias Engdegård |
Subject: |
master 1a88a28ace 1/4: * lisp/subr.el (with-demoted-errors): Better message and location. |
Date: |
Thu, 29 Dec 2022 06:44:03 -0500 (EST) |
branch: master
commit 1a88a28ace24c8b4fb1e4780948b50dd37ada539
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
* lisp/subr.el (with-demoted-errors): Better message and location.
---
lisp/subr.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index d24169276a..f0081de061 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4850,6 +4850,7 @@ but that should be robust in the unexpected case that an
error is signaled."
(declare (debug t) (indent 1))
(let* ((err (make-symbol "err"))
(orig-body body)
+ (orig-format format)
(format (if (and (stringp format) body) format
(prog1 "Error: %S"
(if format (push format body)))))
@@ -4860,7 +4861,9 @@ but that should be robust in the unexpected case that an
error is signaled."
(if (eq orig-body body) exp
;; The use without `format' is obsolete, let's warn when we bump
;; into any such remaining uses.
- (macroexp-warn-and-return "Missing format argument" exp nil nil
format))))
+ (macroexp-warn-and-return
+ "Missing format argument in `with-demote-errors'" exp nil nil
+ orig-format))))
(defmacro combine-after-change-calls (&rest body)
"Execute BODY, but don't call the after-change functions till the end.