From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug#12022: [PATCH] Unable to use anonymous functions for Key Translations Date: Tue, 21 Aug 2012 13:40:17 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345598411 9826 80.91.229.3 (22 Aug 2012 01:20:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2012 01:20:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Barry OReilly Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 22 03:20:11 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T3zcA-0007X9-2o for ged-emacs-devel@m.gmane.org; Wed, 22 Aug 2012 03:20:10 +0200 Original-Received: from localhost ([::1]:36537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3zc5-0001p0-15 for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2012 21:20:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3zbj-0000lM-DI for emacs-devel@gnu.org; Tue, 21 Aug 2012 21:19:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T3zbd-0007ae-0G for emacs-devel@gnu.org; Tue, 21 Aug 2012 21:19:43 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T3zbc-0007aW-Su for emacs-devel@gnu.org; Tue, 21 Aug 2012 21:19:36 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q7M1JXIe009468; Tue, 21 Aug 2012 21:19:35 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id A2322AE3CC; Tue, 21 Aug 2012 13:40:17 -0400 (EDT) In-Reply-To: (Barry OReilly's message of "Fri, 17 Aug 2012 11:05:52 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4317=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4317> : streams <803545> : uri <1198787> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152727 Archived-At: > What I'm really doing involves the need for a closure, so I proceeded to > enable lexical binding. This causes the test case to fail again. I looked > into it and found that DEFUN("functionp", ...) checks EQ (car, Qclosure) > but FUNCTIONP does not. Oops, sounds like a bug. > We could add the same check to FUNCTIONP, but I'm > wondering if one of these functions should leverage the other? Yes. The bulk of Ffunctionp should probably be moved to lisp.h into a "functionp" inlinable function, then make FUNCTIONP an alias for functionp and make Ffunctionp use functionp. Stefan