branch: externals/dash commit 8c47f17cbc1ad8fba2172f7353a8e766238be090 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Matus Goljer <dota.k...@gmail.com>
Add function signatures for aliases of built-in functions (#201) Otherwise, Emacs cannot show helpful signatures, and just uses ARG1 ARG2 instead. For example, prior to this change, `-drop` was described as: -drop is an alias for `nthcdr' in `dash.el'. (-drop ARG1 ARG2) Return the tail of LIST without the first N items. --- dash.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dash.el b/dash.el index f5561b5..8542df2 100644 --- a/dash.el +++ b/dash.el @@ -469,7 +469,9 @@ See also: `-flatten'" (apply 'append lists)) (defalias '-copy 'copy-sequence - "Create a shallow copy of LIST.") + "Create a shallow copy of LIST. + +\(fn LIST)") (defun -splice (pred fun list) "Splice lists generated by FUN in place of elements matching PRED in LIST. @@ -572,7 +574,9 @@ Alias: `-any'" (--last (funcall pred it) list)) (defalias '-first-item 'car - "Return the first item of LIST, or nil on an empty list.") + "Return the first item of LIST, or nil on an empty list. + +\(fn LIST)") (defun -last-item (list) "Return the last item of LIST, or nil on an empty list." @@ -723,7 +727,9 @@ See also: `-take'" (defalias '-drop 'nthcdr "Return the tail of LIST without the first N items. -See also: `-drop-last'") +See also: `-drop-last' + +\(fn N LIST)") (defun -drop-last (n list) "Remove the last N items of LIST and return a copy.