2008-10-19 Eli Zaretskii <eliz@gnu.org>
+ * subr.el (apply-partially): Moved here from minibuffer.el. Doc fix.
+
* simple.el (minibuffer-default-add-shell-commands): Doc fix.
2008-10-19 Martin Rudalics <rudalics@gmx.at>
(or res
(if firsterror (signal (car firsterror) (cdr firsterror))))))
-(defun apply-partially (fun &rest args)
- "Do a \"curried\" 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 that takes the remaining arguments,
-and calls FUN."
- (lexical-let ((fun fun) (args1 args))
- (lambda (&rest args2) (apply fun (append args1 args2)))))
-
(defun complete-with-action (action table string pred)
"Perform completion ACTION.
STRING is the string to complete.
(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)))))
+
\f
;;;; Support for yanking and text properties.