summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-12-28 13:10:35 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2022-12-29 11:03:03 +0100
commit1a88a28ace24c8b4fb1e4780948b50dd37ada539 (patch)
tree73ecce540e3e3e9fe232b3867bb157d4d3ac273d /lisp/subr.el
parentd9d90666f545dc25be63c1b16c030ce1aa96510e (diff)
downloademacs-1a88a28ace24c8b4fb1e4780948b50dd37ada539.tar.gz
emacs-1a88a28ace24c8b4fb1e4780948b50dd37ada539.tar.bz2
emacs-1a88a28ace24c8b4fb1e4780948b50dd37ada539.zip
* lisp/subr.el (with-demoted-errors): Better message and location.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el5
1 files changed, 4 insertions, 1 deletions
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.