diff --git a/core/core-lib.el b/core/core-lib.el index 2325b4f57..5bbb7e5f3 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -177,6 +177,17 @@ Accepts the same arguments as `message'." format-string) ,@args)))) +(defalias 'doom-partial #'apply-partially) + +(defun doom-rpartial (fn &rest args) + "Return a function that is a partial application of FUN to right-hand ARGS. + +ARGS is a list of the last N arguments to pass to FUN. The result is a new +function which does the same as FUN, except that the last N arguments are fixed +at the values with which this function was called." + (lambda (&rest pre-args) + (apply fn (append pre-args args)))) + (cl-defun doom-files-in (paths &rest rest &key