help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: sending function arguments to recursive function calls


From: Gauthier Östervall
Subject: Re: sending function arguments to recursive function calls
Date: Tue, 7 May 2013 13:25:31 +0200

On Sat, May 4, 2013 at 5:30 PM, Drew Adams <drew.adams@oracle.com> wrote:
> The key to the puzzle is this little declaration in the first comment of the
> file:
>
> ;;; face-remap.el --- Functions for ... -*- lexical-binding: t -*-
>
> That `lexical-binding t' tells Emacs that the code in this file is meant to be
> understood with the variable `lexical-binding' bound to t (locally).

Thanks for the kind words and the explanation. I do not feel very
confident about having a function that relies on a file scope setting
of lexical-binding, which as in this case happens 300 lines earlier.
Wouldn't it be better to have functions that work whatever the value
of lexical-binding, if possible?

> An alternative to using a lexical binding here would be to simply use this:
>
>  `(lambda () (interactive) (text-scale-adjust (abs ',inc)))

If this alternative works whatever lexical-binding, it seems superior
to me. Isn't it?



reply via email to

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