From: morioka Date: Tue, 9 Jun 1998 07:20:29 +0000 (+0000) Subject: (when): New macro. X-Git-Tag: apel-8_15~5 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09072c9a2fa2e6702a4478400d720ed5c28a28d6;p=elisp%2Fapel.git (when): New macro. --- 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'."