From 83053c59f84a1a2de9a9e430b120134e13b34ec5 Mon Sep 17 00:00:00 2001 From: keiichi Date: Fri, 12 Mar 1999 02:31:36 +0000 Subject: [PATCH] (condition-case-if): New macro. --- poe.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ;;; -- 1.7.10.4