diff options
| author | Eli Zaretskii | 2008-10-20 19:04:30 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-10-20 19:04:30 +0000 |
| commit | 887247d23cc6110c5901fc472b13ad5e997398b5 (patch) | |
| tree | a8d3c2aae8aeccde865c6321ba6582b30c878e8d | |
| parent | d551d20ddab310e177d694c825c2ac1a0e4df639 (diff) | |
| download | emacs-887247d23cc6110c5901fc472b13ad5e997398b5.tar.gz emacs-887247d23cc6110c5901fc472b13ad5e997398b5.zip | |
Fix last change (again).
| -rw-r--r-- | lisp/subr.el | 26 |
1 files changed, 13 insertions, 13 deletions
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)'." | |||
| 72 | ;; Does nothing - byte-compile-declare-function does the work. | 72 | ;; Does nothing - byte-compile-declare-function does the work. |
| 73 | nil) | 73 | nil) |
| 74 | 74 | ||
| 75 | ;; This is for lexical-let in apply-partially. It is here because cl | ||
| 76 | ;; needs declare-function, defined above. | ||
| 77 | (eval-when-compile (require 'cl)) | ||
| 78 | |||
| 79 | 75 | ||
| 80 | ;;;; Basic Lisp macros. | 76 | ;;;; Basic Lisp macros. |
| 81 | 77 | ||
| @@ -2260,15 +2256,6 @@ Otherwise, return nil." | |||
| 2260 | (get-char-property (1- (field-end pos)) 'field) | 2256 | (get-char-property (1- (field-end pos)) 'field) |
| 2261 | raw-field))) | 2257 | raw-field))) |
| 2262 | 2258 | ||
| 2263 | (defun apply-partially (fun &rest args) | ||
| 2264 | "Return a function that is a partial application of FUN to ARGS. | ||
| 2265 | ARGS is a list of the first N arguments to pass to FUN. | ||
| 2266 | The result is a new function which does the same as FUN, except that | ||
| 2267 | the first N arguments are fixed at the values with which this function | ||
| 2268 | was called." | ||
| 2269 | (lexical-let ((fun fun) (args1 args)) | ||
| 2270 | (lambda (&rest args2) (apply fun (append args1 args2))))) | ||
| 2271 | |||
| 2272 | 2259 | ||
| 2273 | ;;;; Support for yanking and text properties. | 2260 | ;;;; Support for yanking and text properties. |
| 2274 | 2261 | ||
| @@ -3569,6 +3556,19 @@ is greater than \"1pre\" which is greater than \"1beta\" which is greater than | |||
| 3569 | \"1alpha\"." | 3556 | \"1alpha\"." |
| 3570 | (version-list-= (version-to-list v1) (version-to-list v2))) | 3557 | (version-list-= (version-to-list v1) (version-to-list v2))) |
| 3571 | 3558 | ||
| 3559 | |||
| 3560 | ;; This is for lexical-let in apply-partially. It is here because cl | ||
| 3561 | ;; needs various macros defined above. | ||
| 3562 | (eval-when-compile (require 'cl)) | ||
| 3563 | |||
| 3564 | (defun apply-partially (fun &rest args) | ||
| 3565 | "Return a function that is a partial application of FUN to ARGS. | ||
| 3566 | ARGS is a list of the first N arguments to pass to FUN. | ||
| 3567 | The result is a new function which does the same as FUN, except that | ||
| 3568 | the first N arguments are fixed at the values with which this function | ||
| 3569 | was called." | ||
| 3570 | (lexical-let ((fun fun) (args1 args)) | ||
| 3571 | (lambda (&rest args2) (apply fun (append args1 args2))))) | ||
| 3572 | 3572 | ||
| 3573 | 3573 | ||
| 3574 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc | 3574 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc |