]> code.delx.au - gnu-emacs/commitdiff
subr.el (apply-partially): Use lexical binding.
authorDavid Kastrup <dak@gnu.org>
Sun, 25 Jan 2015 19:42:46 +0000 (20:42 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 8 Feb 2015 21:50:53 +0000 (19:50 -0200)
Fixes: debbugs:19785
See
<URL:http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00784.html>
for discussion.

lisp/ChangeLog
lisp/subr.el

index 64424b74c9507f19b8fbc6cad78ef251f2790138..d95c0e6d6071094bbd5e5a68fffa64ad22a33dc1 100644 (file)
@@ -1,3 +1,7 @@
+2015-02-08  David Kastrup  <dak@gnu.org>
+
+       * subr.el (apply-partially): Use lexical binding here.
+
 2015-02-08  Artur Malabarba  <bruce.connor.am@gmail.com>
 
        * newcomment.el (comment-line): New command.
index 0dfb8ed2a51e1ee786bb7b9cb4bba9d34b8518c3..deadca6efa0bcd5ece0fc4579ba79506768ada36 100644 (file)
@@ -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.