From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rolando Pereira Newsgroups: gmane.emacs.devel Subject: Add a filter function to emacs Date: Wed, 7 Jul 2010 20:45:49 +0100 Message-ID: <20100707194545.GA14668@rolando-desktop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278567580 10030 80.91.229.12 (8 Jul 2010 05:39:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Jul 2010 05:39:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 08 07:39:36 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWjpg-000470-FF for ged-emacs-devel@m.gmane.org; Thu, 08 Jul 2010 07:39:36 +0200 Original-Received: from localhost ([127.0.0.1]:40210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWjpf-0007pJ-S5 for ged-emacs-devel@m.gmane.org; Thu, 08 Jul 2010 01:39:35 -0400 Original-Received: from [140.186.70.92] (port=57556 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWaZP-0005mE-Up for emacs-devel@gnu.org; Wed, 07 Jul 2010 15:46:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWaZE-00043X-Rc for emacs-devel@gnu.org; Wed, 07 Jul 2010 15:46:02 -0400 Original-Received: from smtp.fe.up.pt ([193.136.28.30]:34577) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWaZE-00042R-Lw for emacs-devel@gnu.org; Wed, 07 Jul 2010 15:46:00 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by smtp.fe.up.pt (Postfix) with ESMTP id ED08013F6E2 for ; Wed, 7 Jul 2010 20:48:57 +0100 (WEST) Original-Received: from smtp.fe.up.pt ([127.0.0.1]) by localhost (smtp2.fe.up.pt [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id beLqToFWZ74V for ; Wed, 7 Jul 2010 20:48:57 +0100 (WEST) Original-Received: from rolando-desktop (unknown [192.168.56.20]) by smtp.fe.up.pt (Postfix) with ESMTPA id 06FB313F6E1 for ; Wed, 7 Jul 2010 20:48:56 +0100 (WEST) Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 08 Jul 2010 01:39:25 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126893 Archived-At: Hello, I would like to know if there is a reason for the lack of a filter function on the emacs code base. According to the Elisp Cookbook on the Emacs Wiki, it seems that it would be simple to implement: (defun my-filter (condp lst) (delq nil (mapcar (lambda (x) (and (funcall condp x) x)) lst))) ;; From http://www.emacswiki.org/emacs/ElispCookbook Shouldn't this function be in the regular emacs code base (maybe in the lisp/simple.el file)? Is there any problem with it?