emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dash f800e2e 186/316: Prefer declare forms over lisp-in


From: ELPA Syncer
Subject: [elpa] externals/dash f800e2e 186/316: Prefer declare forms over lisp-indent-function
Date: Mon, 15 Feb 2021 15:57:55 -0500 (EST)

branch: externals/dash
commit f800e2e6537f0a16a4041f488b14f10706a61dff
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Prefer declare forms over lisp-indent-function
    
    * dash.el (-each, -each-indexed, -each-while, -dotimes): Use declare
    forms to set preferred indentation.
---
 dash.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/dash.el b/dash.el
index 866a29b..58cbdef 100644
--- a/dash.el
+++ b/dash.el
@@ -91,10 +91,9 @@ Note: `it' is not required in each form."
 
 (defun -each (list fn)
   "Call FN with every item in LIST. Return nil, used for side-effects only."
+  (declare (indent 1))
   (--each list (funcall fn it)))
 
-(put '-each 'lisp-indent-function 1)
-
 (defalias '--each-indexed '--each)
 
 (defun -each-indexed (list fn)
@@ -103,8 +102,8 @@ Note: `it' is not required in each form."
 In the anaphoric form `--each-indexed', the index is exposed as symbol 
`it-index'.
 
 See also: `-map-indexed'."
+  (declare (indent 1))
   (--each list (funcall fn it-index it)))
-(put '-each-indexed 'lisp-indent-function 1)
 
 (defmacro --each-while (list pred &rest body)
   "Anaphoric form of `-each-while'."
@@ -124,10 +123,9 @@ See also: `-map-indexed'."
 (defun -each-while (list pred fn)
   "Call FN with every item in LIST while (PRED item) is non-nil.
 Return nil, used for side-effects only."
+  (declare (indent 2))
   (--each-while list (funcall pred it) (funcall fn it)))
 
-(put '-each-while 'lisp-indent-function 2)
-
 (defmacro --each-r (list &rest body)
   "Anaphoric form of `-each-r'."
   (declare (debug (form body))
@@ -184,10 +182,9 @@ Return nil, used for side-effects only."
 
 (defun -dotimes (num fn)
   "Repeatedly calls FN (presumably for side-effects) passing in integers from 
0 through NUM-1."
+  (declare (indent 1))
   (--dotimes num (funcall fn it)))
 
-(put '-dotimes 'lisp-indent-function 1)
-
 (defun -map (fn list)
   "Return a new list consisting of the result of applying FN to the items in 
LIST."
   (mapcar fn list))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]