From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Common Lisp like feature expressions (was: How and when to use GCPRO?) Date: Mon, 27 Dec 2010 20:38:21 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1293478720 8189 80.91.229.12 (27 Dec 2010 19:38:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Dec 2010 19:38:40 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 27 20:38:35 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 1PXItu-0005uZ-So for ged-emacs-devel@m.gmane.org; Mon, 27 Dec 2010 20:38:35 +0100 Original-Received: from localhost ([127.0.0.1]:34934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXItt-0007QB-Lw for ged-emacs-devel@m.gmane.org; Mon, 27 Dec 2010 14:38:33 -0500 Original-Received: from [140.186.70.92] (port=53109 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXIto-0007Q6-HJ for emacs-devel@gnu.org; Mon, 27 Dec 2010 14:38:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXItm-00048h-KR for emacs-devel@gnu.org; Mon, 27 Dec 2010 14:38:27 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.10]:58626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXItm-00048b-E3 for emacs-devel@gnu.org; Mon, 27 Dec 2010 14:38:26 -0500 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id D7623188A196; Mon, 27 Dec 2010 20:38:23 +0100 (CET) X-Auth-Info: BPEdCDd+9VH63ildL1eN9Ehf+QuGuFEoWjF9/yOCiLU= Original-Received: from linux.local (p508B54ED.dip.t-dialin.net [80.139.84.237]) by mail.mnet-online.de (Postfix) with ESMTPA id 16BC41C00088; Mon, 27 Dec 2010 20:38:24 +0100 (CET) Original-Received: by linux.local (Postfix, from userid 501) id 6B0911E52EC; Mon, 27 Dec 2010 20:38:22 +0100 (CET) X-Yow: How many retired bricklayers from FLORIDA are out purchasing PENCIL SHARPENERS right NOW?? In-Reply-To: (Leo's message of "Mon, 27 Dec 2010 19:26:03 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:133988 Archived-At: Leo writes: > +(defun eval-feature-expression (form) > + (cond > + ((atom form) (featurep form nil)) > + ;; ensure form is a proper list > + ((condition-case nil > + (and (length form) nil) Nice quadratic behaviour. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."