all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gauthier Östervall" <gauthier@ostervall.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>, help-gnu-emacs@gnu.org
Subject: Re: sending function arguments to recursive function calls
Date: Thu, 9 May 2013 10:35:36 +0200	[thread overview]
Message-ID: <CAM8gEggrodpHeG-JUbg7bVtsLM1dyEnQ4UMfWNnse2CJt87wQw@mail.gmail.com> (raw)
In-Reply-To: <jwvli7pekco.fsf-monnier+gmane.emacs.help@gnu.org>

On Wed, May 8, 2013 at 2:21 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Actually, Emacs's lexical-binding variant of Elisp is pretty close to
> Common Lisp: the default binding is lexical but you can use dynamic
> binding for specific cases.
>
> The difference is that Emacs has to keep the old compatibility mode
> where lexical-binding is nil, whereas Common-Lisp never had such a thing.
>
>> Lexical binding was added to Emacs relatively recently.  With time,
>> perhaps it and dynamic binding will become better roommates.
>
> When lexical-binding is t, they're very good roomates already.
> Hopefully with time, the "lexical-binding = nil" case can be dropped.

If I have an existing file with lexical-binding = nil, and I want to
add more functions to that file, what is then the preferred way to do
it?  Should I write the new function with lexical-binding = t?  Isn't
it risky or wrong to set lexical-binding at the top of the file (like
face-remap.el does), what would happen to the other functions, which
earlier had lexical-binding = nil?

Is there a way (and is it better) to set lexical-binding = t locally
for the new function?

Or is it better to make the new function work with lexical-binding =
nil, despite the caveats described by Pascal?



  reply	other threads:[~2013-05-09  8:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04 13:01 sending function arguments to recursive function calls Gauthier Östervall
2013-05-04 15:30 ` Drew Adams
2013-05-07 11:25   ` Gauthier Östervall
2013-05-07 14:04     ` Drew Adams
2013-05-08 12:21       ` Stefan Monnier
2013-05-09  8:35         ` Gauthier Östervall [this message]
2013-05-09 12:23           ` Stefan Monnier
2013-05-12 13:19             ` Gauthier Östervall
2013-05-13 14:55               ` Stefan Monnier
2013-05-17 12:20                 ` Gauthier Östervall
2013-05-17 12:26                   ` Dmitry Gutov
2013-05-17 14:31                     ` Drew Adams
2013-05-19 16:57                       ` Dmitry Gutov
2013-05-21 16:34                         ` Drew Adams
     [not found]                       ` <mailman.70.1368982677.22516.help-gnu-emacs@gnu.org>
2013-05-19 20:59                         ` Pascal J. Bourguignon
2013-05-20 19:31                           ` Dmitry Gutov
     [not found]                           ` <mailman.94.1369078320.22516.help-gnu-emacs@gnu.org>
2013-05-20 19:55                             ` Pascal J. Bourguignon
2013-05-07 14:32     ` Pascal J. Bourguignon
     [not found]     ` <mailman.25279.1367935468.855.help-gnu-emacs@gnu.org>
2013-05-07 14:55       ` Pascal J. Bourguignon
2013-05-08 12:25         ` Stefan Monnier
2013-05-05  1:22 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM8gEggrodpHeG-JUbg7bVtsLM1dyEnQ4UMfWNnse2CJt87wQw@mail.gmail.com \
    --to=gauthier@ostervall.se \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.