From: Mattias EngdegÄrd Date: Wed, 28 Dec 2022 12:10:35 +0000 (+0100) Subject: * lisp/subr.el (with-demoted-errors): Better message and location. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1a88a28ace24c8b4fb1e4780948b50dd37ada539;p=emacs.git * lisp/subr.el (with-demoted-errors): Better message and location. --- diff --git a/lisp/subr.el b/lisp/subr.el index d24169276a5..f0081de0619 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.