From: David Kastrup Date: Sun, 25 Jan 2015 19:42:46 +0000 (+0100) Subject: subr.el (apply-partially): Use lexical binding. X-Git-Tag: emacs-25.0.90~2008^2~62 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/19ee7875db8b154a3ba49a98da2d3c24b03fff1e subr.el (apply-partially): Use lexical binding. Fixes: debbugs:19785 See for discussion. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 64424b74c9..d95c0e6d60 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2015-02-08 David Kastrup + + * subr.el (apply-partially): Use lexical binding here. + 2015-02-08 Artur Malabarba * newcomment.el (comment-line): New command. diff --git a/lisp/subr.el b/lisp/subr.el index 0dfb8ed2a5..deadca6efa 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.