1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

* lisp/subr.el (with-demoted-errors): Better message and location.

This commit is contained in:
Mattias Engdegård 2022-12-28 13:10:35 +01:00
parent d9d90666f5
commit 1a88a28ace

View File

@ -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.