>From 3ebbe29b9e7c9112933bdbad1b8f38119524d11e Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 25 Jan 2015 20:42:46 +0100 Subject: [PATCH] Let apply-partially make use of lexical binding in subr.el * subr.el (apply-partially): Use lexical binding here. See 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 694a35b..9e8602a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2015-01-25 David Kastrup + + * subr.el (apply-partially): Use lexical binding here. + 2015-02-05 Stefan Monnier * delsel.el: Deprecate the `kill' option. Use lexical-binding. diff --git a/lisp/subr.el b/lisp/subr.el index 68cd230..496f711 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