From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: lexbind ready for merge Date: Tue, 29 Mar 2011 16:43:37 -0700 Message-ID: <4D926EA9.5080509@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1301442241 13403 80.91.229.12 (29 Mar 2011 23:44:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2011 23:44:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 30 01:43:50 2011 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 1Q4iZg-0001P3-Lv for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2011 01:43:48 +0200 Original-Received: from localhost ([127.0.0.1]:60058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4iZg-0003My-6h for ged-emacs-devel@m.gmane.org; Tue, 29 Mar 2011 19:43:48 -0400 Original-Received: from [140.186.70.92] (port=39813 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4iZZ-0003K3-Nj for emacs-devel@gnu.org; Tue, 29 Mar 2011 19:43:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4iZY-0003n9-IM for emacs-devel@gnu.org; Tue, 29 Mar 2011 19:43:41 -0400 Original-Received: from mail-px0-f179.google.com ([209.85.212.179]:63769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4iZY-0003mz-AX for emacs-devel@gnu.org; Tue, 29 Mar 2011 19:43:40 -0400 Original-Received: by pxi2 with SMTP id 2so167209pxi.38 for ; Tue, 29 Mar 2011 16:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=yC7YK2Dpc1SSodozGKYFpsdd1pWbmodmpaur1AqemlM=; b=WlWVgJ/++IynvPEVXxAuCHCRQ3H7ecwSCULvL9naIzVOdrowF7RzZ3qaA6hT3IRpG0 wkc7d5HRZNEcEEVmpVqGlDLqcpFRtU+GjEBPE80/zN+7omecDWO7bv61nNrwnzyTLljd bkWYMNBbyRuYXMOI5naVAvVu4ZWlgvvWJrfHA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cx//rW+DkaqpChen2owsuvT17ToBURbl3ciTv3d9U11AHs9tdG1MpCpuVwWgrZOJiC qWxnkYm4zwEqMiWnUM/O49UpzNZNdDUi0SsFa+ZF14/IUNkvnQ9sfDLO1sU/bjqjamFQ nhZdu9N7PnCUamK0ijCtCfSf1pxPGmbgXWxMY= Original-Received: by 10.143.33.18 with SMTP id l18mr314895wfj.334.1301442219167; Tue, 29 Mar 2011 16:43:39 -0700 (PDT) Original-Received: from [0.0.0.0] (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id p40sm7877595wfc.5.2011.03.29.16.43.37 (version=SSLv3 cipher=OTHER); Tue, 29 Mar 2011 16:43:38 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.179 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:137882 Archived-At: On 3/29/2011 2:44 PM, Stefan Monnier wrote: > OK, so AFAIK the lexbind branch is pretty much ready for merge. > The only issue is that I'm not sure it has seen as much testing as > I'd like, but then that's largely because it hasn't been merged yet. > So if I don't hear any screams until then, I plan to merge it into trunk > over the week-end or nearby. Thanks. I've been looking forward to this for a while. Just a few comments (I might send patches for some of these things when I have time): - The elisp manual still claims in a variety of places that Emacs does not support closures - apply-partially should have a compiler-macro now that we can implement it very efficiently; also, funcall-partially. - It might be a good idea to remove the "Once Emacs 19 becomes standard..." comment from cl.el - Can lexical-let and lexical-let* be made a no-op when compiling lexbound code? Looking at cl.el, it appears they're still up their usual dirty tricks. - lexical-binding only applies to code evaluated by `eval-buffer' and `eval-region'?! So I can't make code evaluated by M-: lexbound? - It'd be nice to be able to write small pieces of lexical code in non-lexbound code, e.g., in the expansion of a macro that gets used by both lexbound and non-lexbound. What's the best way to do that? - The documentation claims that defun doesn't capture its lexical scope. In interpreted code, it does. (require 'cl) (let ((bar2 5)) (defun foo () (incf bar2) (message "hi: %s" bar2))) In compiled code, we do not capture the variable and instead warn about it. Instead, we should capture the variable. Common Lisp explicitly allows this use, and it's convenient in some cases. - Disassembling a closure reports closed-over variables as constants; they're not. - Do we really use a whole cons cell for each closed-over variable, even in compiled code?