all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: David Kastrup <dak@gnu.org>
Cc: Leo Liu <sdl.web@gmail.com>, emacs-devel@gnu.org
Subject: Re: What's up with apply-partially?
Date: Sun, 25 Jan 2015 09:32:44 -0500	[thread overview]
Message-ID: <jwvy4orrkzz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zj984kz6.fsf@fencepost.gnu.org> (David Kastrup's message of "Sat, 24 Jan 2015 09:54:37 +0100")

>>> I have been wondering this myself. I wonder if it was a workaround from
>>> the time when lexical-binding was not activated in subr.el?
>> Yes, I think this is the explanation.  Feel free to change it,
> Huh.  Perhaps this causes different behavior depending on whether the
> _use_ of apply-partially happens in a file with lexical-binding being
> `nil'?

No.

> Or the use of the function defined using it?

Neither.

> After all, apply-partially was first defined when lexical binding was
> not available in Emacs.

That's right, but it was defined differently then.  When lexical-binding
appeared, it made it possible to re-implement apply-partially
differently so as to avoid the problem of name-capture.  That's the code
in use now.  At that time, subr.el was not yet using lexical-binding, so
I did not just use a "normal closure".

> So some uses might depend on particular
> semantics in non-lexical-binding files?

No.


        Stefan



  reply	other threads:[~2015-01-25 14:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 22:14 What's up with apply-partially? David Kastrup
2015-01-24  3:05 ` Leo Liu
2015-01-24  5:01   ` Stefan Monnier
2015-01-24  8:54     ` David Kastrup
2015-01-25 14:32       ` Stefan Monnier [this message]
2015-01-25 19:45         ` [PATCH] Let apply-partially make use of lexical binding in subr.el David Kastrup
2015-01-27 16:12           ` David Kastrup
2015-01-29 15:01             ` Stefan Monnier
2015-01-29 15:17               ` David Kastrup
2015-02-05 17:55                 ` David Kastrup
2015-01-24  3:53 ` What's up with apply-partially? Artur Malabarba

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=jwvy4orrkzz.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sdl.web@gmail.com \
    /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.