emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An idea: combine-change-calls


From: Alan Mackenzie
Subject: Re: An idea: combine-change-calls
Date: Tue, 27 Mar 2018 17:00:08 +0000
User-agent: Mutt/1.7.2 (2016-11-26)

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]