From 09072c9a2fa2e6702a4478400d720ed5c28a28d6 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 9 Jun 1998 07:20:29 +0000 Subject: [PATCH] (when): New macro. --- emu.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emu.el b/emu.el index 2491547..5752b03 100644 --- a/emu.el +++ b/emu.el @@ -277,6 +277,11 @@ Value is nil if OBJECT is not a buffer or if it has been killed. ;;; @ Emacs 20.1 emulation ;;; +;; This macro was imported Emacs 20.2. +(defmacro-maybe when (cond &rest body) + "(when COND BODY...): if COND yields non-nil, do BODY, else return nil." + (list 'if cond (cons 'progn body))) + (defmacro-maybe save-current-buffer (&rest body) "Save the current buffer; execute BODY; restore the current buffer. Executes BODY just like `progn'." -- 1.7.10.4