From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Cc: David Kastrup <dak@gnu.org>
Subject: [PATCH] Let apply-partially make use of lexical binding in subr.el
Date: Sun, 25 Jan 2015 20:45:37 +0100 [thread overview]
Message-ID: <1422215137-1653-1-git-send-email-dak@gnu.org> (raw)
In-Reply-To: <jwvy4orrkzz.fsf-monnier+emacs@gnu.org>
* subr.el (apply-partially): Use lexical binding here.
See
<URL:http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00784.html>
for discussion.
---
lisp/ChangeLog | 4 ++++
lisp/subr.el | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 70293af..7cd831c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-25 David Kastrup <dak@gnu.org>
+
+ * subr.el (apply-partially): Use lexical binding here.
+
2015-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-generic.el (cl--generic-no-next-method-function): New fun.
diff --git a/lisp/subr.el b/lisp/subr.el
index 0534585..4dee603 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -136,8 +136,8 @@ ARGS is a list of the first N arguments to pass to FUN.
The result is a new function which does the same as FUN, except that
the first N arguments are fixed at the values with which this function
was called."
- `(closure (t) (&rest args)
- (apply ',fun ,@(mapcar (lambda (arg) `',arg) args) args)))
+ (lambda (&rest args2)
+ (apply fun (append args args2))))
(defmacro push (newelt place)
"Add NEWELT to the list stored in the generalized variable PLACE.
--
2.1.0
next prev parent reply other threads:[~2015-01-25 19:45 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
2015-01-25 19:45 ` David Kastrup [this message]
2015-01-27 16:12 ` [PATCH] Let apply-partially make use of lexical binding in subr.el 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=1422215137-1653-1-git-send-email-dak@gnu.org \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
/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.