(condition-case-if): New macro.
authorkeiichi <keiichi>
Fri, 12 Mar 1999 02:31:36 +0000 (02:31 +0000)
committerkeiichi <keiichi>
Fri, 12 Mar 1999 02:31:36 +0000 (02:31 +0000)
poe.el

diff --git a/poe.el b/poe.el
index b0ee6f3..c0398b9 100644 (file)
--- a/poe.el
+++ b/poe.el
              (string-match (format "%d\\." emacs-major-version)
                            emacs-version))))
 
+(defmacro condition-case-if (cond var bodyform &rest handlers)
+  "If COND yields non-nil at run-time, do wrapped BODYFORM in 
+`condition-case' with VAR and HANDLERS, else do bare BODYFORM."
+  (` (if (, cond)
+       (condition-case (, var)
+           (, bodyform)
+         (,@ handlers))
+       (, bodyform)
+       )))
+(put 'condition-case-if 'lisp-indent-function 2)
+
 (cond ((featurep 'xemacs)
        (require 'poe-xemacs)
        )
        (require 'poe-18)
        ))
 
-
 ;;; @ Emacs 19.23 emulation
 ;;;