Function: ibuffer-aif
ibuffer-aif is a macro defined in ibuf-macs.el.gz.
Signature
(ibuffer-aif TEST TRUE-BODY &rest FALSE-BODY)
Documentation
Evaluate TRUE-BODY or FALSE-BODY depending on value of TEST.
If TEST returns non-nil, bind it to the value, and evaluate
TRUE-BODY. Otherwise, evaluate forms in FALSE-BODY as if in progn.
Compare with if.
Source Code
;; Defined in /usr/src/emacs/lisp/ibuf-macs.el.gz
;; From Paul Graham's "ANSI Common Lisp", adapted for Emacs Lisp here.
(defmacro ibuffer-aif (test true-body &rest false-body)
"Evaluate TRUE-BODY or FALSE-BODY depending on value of TEST.
If TEST returns non-nil, bind `it' to the value, and evaluate
TRUE-BODY. Otherwise, evaluate forms in FALSE-BODY as if in `progn'.
Compare with `if'."
(declare (indent 2))
(let ((sym (make-symbol "ibuffer-aif-sym")))
`(let ((,sym ,test))
(if ,sym
(let ((it ,sym))
,true-body)
(progn
,@false-body)))))