[gnus git] branch master updated: n0-17-392-g134b495 =1= * dgnushack.el (fboundp): Define `with-demoted-errors' for Emacsen that doesn't have it.
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 134b49544c7f140cf30c1874cfa64c491d5dbdbd (commit)
from b300eca64bd52964d02082b5abe2ba0e8d2c3c31 (commit)
- Log -----------------------------------------------------------------
commit 134b49544c7f140cf30c1874cfa64c491d5dbdbd
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Mon Nov 21 21:10:51 2011 +0100
* dgnushack.el (fboundp): Define `with-demoted-errors' for Emacsen that doesn't have it.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e18789e..8a9619d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2011-11-21 Lars Magne Ingebrigtsen <[email protected]>
+ * dgnushack.el (fboundp): Define `with-demoted-errors' for Emacsen that
+ doesn't have it.
+
* mm-view.el (mm-display-inline-fontify): Make the font-lock variables
buffer-local instead of binding them to avoid warnings. Also demote
errors (bug#10063).
diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el
index e3110d7..987bb28 100644
--- a/lisp/dgnushack.el
+++ b/lisp/dgnushack.el
@@ -549,4 +549,16 @@ or remove them using `make remove-installed-shadows'.\n\n"))))))))
(error (princ "failed\n")))))
(setq path (cdr path))))))
+(unless (fboundp 'with-demoted-errors)
+ (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.
+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
+ (progn ,@body)
+ (error (message "Error: %S" ,err) nil)))))
+
;;; dgnushack.el ends here
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 3 +++
lisp/dgnushack.el | 12 ++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project