diff options
| author | Stefan Kangas | 2025-02-28 18:30:57 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-02-28 18:33:10 +0100 |
| commit | 2435749efa5b082b520bb1e40db3d3c839023c04 (patch) | |
| tree | 2b1016b8afa0227241010c48f7dd79be9c7b1541 | |
| parent | 8b659313b83c82cfe09af1638289fccdfc9af23d (diff) | |
| download | emacs-2435749efa5b082b520bb1e40db3d3c839023c04.tar.gz emacs-2435749efa5b082b520bb1e40db3d3c839023c04.zip | |
Add compiler macro to apply-partially
* lisp/subr.el (apply-partially): Add compiler macro.
| -rw-r--r-- | lisp/subr.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 128bf258ab6..bc5f8943fb4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -537,7 +537,12 @@ ARGS is a list of the first N arguments to pass to FUN. | |||
| 537 | The result is a new function which does the same as FUN, except that | 537 | The result is a new function which does the same as FUN, except that |
| 538 | the first N arguments are fixed at the values with which this function | 538 | the first N arguments are fixed at the values with which this function |
| 539 | was called." | 539 | was called." |
| 540 | (declare (side-effect-free error-free)) | 540 | (declare (side-effect-free error-free) |
| 541 | (compiler-macro | ||
| 542 | (lambda (_) | ||
| 543 | `(lambda (&rest args2) | ||
| 544 | ,(let ((l (length args))) | ||
| 545 | `(apply ,fun ,@args args2)))))) | ||
| 541 | (lambda (&rest args2) | 546 | (lambda (&rest args2) |
| 542 | (apply fun (append args args2)))) | 547 | (apply fun (append args args2)))) |
| 543 | 548 | ||