* subr.el (filter): New macro. Because it's just silly for a Lisp not
to have this in 2014. And VC mode needs it.
2014-12-02 Eric S. Raymond <esr@snark.thyrsus.com>
- * vc.el, all backends: API simplification: Abolish dir-status.
+ * subr.el (filter): New macro. Because it's just silly for a Lisp
+ not to have this in 2014. And VC needs it.
+
+ * vc.el, all backends: API simplification: Abolish dir-status.
It's replaced by dir-status-files.
* vc.el, all backends: API simplification: Remove 4th
,@(if (cdr (cdr spec))
`((setq ,(car spec) nil) ,@(cdr (cdr spec))))))))
+(defmacro filter (condp lst)
+ "Return the list consisting of elements in LST for which CONDP is not nil."
+ `(delq nil
+ (mapcar (lambda (x) (and (funcall ,condp x) x)) ,lst)))
+
(defmacro dotimes (spec &rest body)
"Loop a certain number of times.
Evaluate BODY with VAR bound to successive integers running from 0,