Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 06 Oct 2011 16:41:35 +0300
changeset 720 e50b78c6a53d
parent 699 9ec79850e725
child 721 3eb929c032f4
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
.emacs-my
--- a/.emacs-my	Mon Sep 19 21:05:09 2011 +0300
+++ b/.emacs-my	Thu Oct 06 16:41:35 2011 +0300
@@ -66,6 +66,14 @@
            ,list)
      r))
 
+(unless (fboundp 'ignore-errors)
+  (defmacro ignore-errors (&rest body)
+    "Execute BODY; if an error occurs, return nil.
+Otherwise, return result of last form in BODY."
+    (declare (debug t) (indent 0))
+    `(condition-case nil (progn ,@body) (error nil)))
+  )
+
 ;;; ----------------------------------------------------------------
 (message "mode groups")