branch: externals/dash
commit 6abc35ad7690405323d05fae214591236a91a460
Merge: 5d25ed2 960b05f
Author: Magnar Sveen <[email protected]>
Commit: Magnar Sveen <[email protected]>
Merge pull request #66 from rejeep/each-indent-level
Set -each function indent level to 1.
---
dash.el | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dash.el b/dash.el
index 3c83412..12c04bc 100644
--- a/dash.el
+++ b/dash.el
@@ -70,6 +70,8 @@ special values."
"Calls FN with every item in LIST. Returns nil, used for side-effects only."
(--each list (funcall fn it)))
+(put '-each 'lisp-indent-function 1)
+
(defmacro --each-while (list pred &rest body)
"Anaphoric form of `-each-while'."
(let ((l (make-symbol "list"))
@@ -88,6 +90,8 @@ special values."
Returns nil, used for side-effects only."
(--each-while list (funcall pred it) (funcall fn it)))
+(put '-each-while 'lisp-indent-function 2)
+
(defmacro --dotimes (num &rest body)
"Repeatedly executes BODY (presumably for side-effects) with `it` bound to
integers from 0 through n-1."
`(let ((it 0))
@@ -101,6 +105,8 @@ Returns nil, used for side-effects only."
"Repeatedly calls FN (presumably for side-effects) passing in integers from
0 through n-1."
(--dotimes num (funcall fn it)))
+(put '-dotimes 'lisp-indent-function 1)
+
(defun -map (fn list)
"Returns a new list consisting of the result of applying FN to the items in
LIST."
(mapcar fn list))