From: keiichi Date: Fri, 12 Mar 1999 02:31:36 +0000 (+0000) Subject: (condition-case-if): New macro. X-Git-Tag: apel-9_14~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=83053c59f84a1a2de9a9e430b120134e13b34ec5;p=elisp%2Fapel.git (condition-case-if): New macro. --- diff --git a/poe.el b/poe.el index b0ee6f3..c0398b9 100644 --- a/poe.el +++ b/poe.el @@ -136,6 +136,17 @@ (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) ) @@ -158,7 +169,6 @@ (require 'poe-18) )) - ;;; @ Emacs 19.23 emulation ;;;