summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el4
2 files changed, 8 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 738fe6d37be..6743a537744 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-24 Glenn Morris <rgm@gnu.org>
+
+ * subr.el (with-demoted-errors): Doc fix.
+
2014-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-macs.el: Improve type->predicate mapping (bug#16520).
diff --git a/lisp/subr.el b/lisp/subr.el
index 6709ebf0d02..e3cc4b05f3f 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3246,9 +3246,13 @@ even if this catches the signal."
(defmacro with-demoted-errors (format &rest body)
"Run BODY and demote any errors to simple messages.
+FORMAT is a string passed to `message' to format any error message.
+It should contain a single %-sequence; e.g., \"Error: %S\".
+
If `debug-on-error' is non-nil, run BODY without catching its errors.
This is to be used around code which is not expected to signal an error
but which should be robust in the unexpected case that an error is signaled.
+
For backward compatibility, if FORMAT is not a constant string, it
is assumed to be part of BODY, in which case the message format
used is \"Error: %S\"."