summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 6c79b3f88e2..00a030c744c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3219,7 +3219,7 @@ If BODY finishes, `while-no-input' returns whatever value BODY produced."
(or (input-pending-p)
(progn ,@body)))))))
-(defmacro condition-case-no-debug (var bodyform &rest handlers)
+(defmacro condition-case-unless-debug (var bodyform &rest handlers)
"Like `condition-case' except that it does not catch anything when debugging.
More specifically if `debug-on-error' is set, then it does not catch any signal."
(declare (debug condition-case) (indent 2))
@@ -3231,6 +3231,9 @@ More specifically if `debug-on-error' is set, then it does not catch any signal.
(funcall ,bodysym)
,@handlers)))))
+(define-obsolete-function-alias 'condition-case-no-debug
+ 'condition-case-unless-debug "24.1")
+
(defmacro with-demoted-errors (&rest body)
"Run BODY and demote any errors to simple messages.
If `debug-on-error' is non-nil, run BODY without catching its errors.
@@ -3238,7 +3241,7 @@ 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."
(declare (debug t) (indent 0))
(let ((err (make-symbol "err")))
- `(condition-case-no-debug ,err
+ `(condition-case-unless-debug ,err
(progn ,@body)
(error (message "Error: %S" ,err) nil))))