From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: An idea: combine-change-calls Date: Tue, 27 Mar 2018 17:00:08 +0000 Message-ID: <20180327170008.GC4105@ACM> References: <20180324135024.GA6319@ACM> <20180325191424.GE6292@ACM> <20180326201728.GA28620@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1522171094 338 195.159.176.226 (27 Mar 2018 17:18:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2018 17:18:14 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 27 19:18:10 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0sEb-0008SD-9t for ged-emacs-devel@m.gmane.org; Tue, 27 Mar 2018 19:18:09 +0200 Original-Received: from localhost ([::1]:35383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0sGe-0007vE-QF for ged-emacs-devel@m.gmane.org; Tue, 27 Mar 2018 13:20:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0sG4-0007v3-Kj for emacs-devel@gnu.org; Tue, 27 Mar 2018 13:19:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0sG1-000364-1r for emacs-devel@gnu.org; Tue, 27 Mar 2018 13:19:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:57906 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1f0sG0-00035t-N2 for emacs-devel@gnu.org; Tue, 27 Mar 2018 13:19:36 -0400 Original-Received: (qmail 48253 invoked by uid 3782); 27 Mar 2018 17:19:36 -0000 Original-Received: from acm.muc.de (p5B14757F.dip0.t-ipconnect.de [91.20.117.127]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 27 Mar 2018 19:19:34 +0200 Original-Received: (qmail 5277 invoked by uid 1000); 27 Mar 2018 17:00:08 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:224102 Archived-At: Hello, Stefan. On Mon, Mar 26, 2018 at 20:36:15 -0400, Stefan Monnier wrote: > > (defmacro combine-change-calls (beg end &rest form) > > `(let* ((-beg- ,beg) > > (-end- ,end) > > (body (lambda () ,@form)) > Don't use `let*` here since otherwise you have a variable capture if > `form` uses variables with name -beg- or -end-, or if the expression > `end` uses a variable named -beg-. Good point. I will delete that obtrusive asterisk. > [ and a nitpick: `form` is usually used for a single expression whereas > here it holds a list of expressions, so I'd call it `forms`. ] I'll do that, too. Thanks. > Stefan -- Alan Mackenzie (Nuremberg, Germany).