From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Are "proper" closures used in Emacs sources? Date: Tue, 12 Jan 2021 16:43:09 +0100 Message-ID: <20210112154309.GA5589@tuxteam.de> References: <875z42s1r3.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25644"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 12 16:44:11 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzLq6-0006Wa-TC for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 16:44:10 +0100 Original-Received: from localhost ([::1]:48560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzLq6-0006sJ-03 for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jan 2021 10:44:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzLpE-0006EE-70 for emacs-devel@gnu.org; Tue, 12 Jan 2021 10:43:16 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:55792) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1kzLp9-0004KU-VH for emacs-devel@gnu.org; Tue, 12 Jan 2021 10:43:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=aOq6RvLs6qux5yScbggl5ibe6UHJnaUDIdzisTa+ygU=; b=eOiBbqLkhdB0oIpqB+rNmVET9w/wiH0TqR3kWGEOPWD7arlaYOIKOys2q5BRDIvVMuF4t1YpMgrny247ArU40qGGmNqo7sSUkQaZZAYq3csV+8QW1O/lmEepQah6ldD85jmMux6wHvaQw2aU0cVb//12BD0bscv/KIhsQvsfDgourUfGsCU6IBXUhzvGwqRE3dNJ/WKvH/uc2FO/631cSdhWCVhvBe3Wq+WcLiN9uwIOQv/zhbVWQcqtPmDdUC3nfhtizDZlq1JeZp3QQ5mf7B0lrDuW/T9lywkaxDyDJ+PzMMaApwQrynyjhtyFh4P1gAPncJTcfhHlW8OT8kybqQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1kzLp7-0001Zd-Cb for emacs-devel@gnu.org; Tue, 12 Jan 2021 16:43:09 +0100 Content-Disposition: inline In-Reply-To: <875z42s1r3.fsf@mbork.pl> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262988 Archived-At: --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 12, 2021 at 02:50:24PM +0100, Marcin Borkowski wrote: > Hi all, >=20 > it's been quite some time since lexical binding was introduced to > Elisp. Apart from possible optimizations and being less error-prone, it > allows for all the cool tricks with closures. Are there any places in > Emacs core where "proper" closures are actually used? (By "proper", > I mean closures with non-empty lexical environment, actually using said > environment.) tar-next-file-displayer of tar-mode.el seems to do (CAVEAT: I just grepped for "closure" in the .el sources, dismissed the too-obvious false-positives and half-scanned comments and code, so I might be off by some amount! Double-check.) Cheers - t --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl/9w40ACgkQBcgs9XrR2kYzswCeLqfCg1sfcrv0+sd8L+sqy+kj RCkAn3Z/lx5YQgUqXRuoQraYNDZqn8qF =CWCu -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--