From: Eli Zaretskii Date: Mon, 20 Oct 2008 19:04:30 +0000 (+0000) Subject: Fix last change (again). X-Git-Tag: emacs-pretest-23.0.90~2327 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=887247d23cc6110c5901fc472b13ad5e997398b5;p=emacs.git Fix last change (again). --- diff --git a/lisp/subr.el b/lisp/subr.el index 350b6b1a25d..a0077794b51 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -72,10 +72,6 @@ For more information, see Info node `elisp(Declaring Functions)'." ;; Does nothing - byte-compile-declare-function does the work. nil) -;; This is for lexical-let in apply-partially. It is here because cl -;; needs declare-function, defined above. -(eval-when-compile (require 'cl)) - ;;;; Basic Lisp macros. @@ -2260,15 +2256,6 @@ Otherwise, return nil." (get-char-property (1- (field-end pos)) 'field) raw-field))) -(defun apply-partially (fun &rest args) - "Return a function that is a partial application of FUN to ARGS. -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." - (lexical-let ((fun fun) (args1 args)) - (lambda (&rest args2) (apply fun (append args1 args2))))) - ;;;; Support for yanking and text properties. @@ -3569,6 +3556,19 @@ is greater than \"1pre\" which is greater than \"1beta\" which is greater than \"1alpha\"." (version-list-= (version-to-list v1) (version-to-list v2))) + +;; This is for lexical-let in apply-partially. It is here because cl +;; needs various macros defined above. +(eval-when-compile (require 'cl)) + +(defun apply-partially (fun &rest args) + "Return a function that is a partial application of FUN to ARGS. +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." + (lexical-let ((fun fun) (args1 args)) + (lambda (&rest args2) (apply fun (append args1 args2))))) ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc