[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash afe2781 388/426: Merge pull request #109 from bbat
From: |
Phillip Lord |
Subject: |
[elpa] externals/dash afe2781 388/426: Merge pull request #109 from bbatsov/threading-indentation |
Date: |
Tue, 04 Aug 2015 19:39:07 +0000 |
branch: externals/dash
commit afe27810c48e978717268bc687c56cc397c3c858
Merge: 5f879b3 9642c4a
Author: Magnar Sveen <address@hidden>
Commit: Magnar Sveen <address@hidden>
Merge pull request #109 from bbatsov/threading-indentation
[Fix #108] Sync indentation of threading forms with Clojure
---
dash.el | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/dash.el b/dash.el
index d0fc30c..60596f4 100644
--- a/dash.el
+++ b/dash.el
@@ -1090,10 +1090,6 @@ in second form, etc."
(list form x))
`(--> (--> ,x ,form) ,@more)))
-(put '-> 'lisp-indent-function 1)
-(put '->> 'lisp-indent-function 1)
-(put '--> 'lisp-indent-function 1)
-
(defun -grade-up (comparator list)
"Grade elements of LIST using COMPARATOR relation, yielding a
permutation vector such that applying this permutation to LIST
@@ -1101,8 +1097,8 @@ sorts it in ascending order."
;; ugly hack to "fix" lack of lexical scope
(let ((comp `(lambda (it other) (funcall ',comparator (car it) (car
other)))))
(->> (--map-indexed (cons it it-index) list)
- (-sort comp)
- (-map 'cdr))))
+ (-sort comp)
+ (-map 'cdr))))
(defun -grade-down (comparator list)
"Grade elements of LIST using COMPARATOR relation, yielding a
@@ -1111,8 +1107,8 @@ sorts it in descending order."
;; ugly hack to "fix" lack of lexical scope
(let ((comp `(lambda (it other) (funcall ',comparator (car other) (car
it)))))
(->> (--map-indexed (cons it it-index) list)
- (-sort comp)
- (-map 'cdr))))
+ (-sort comp)
+ (-map 'cdr))))
(defun dash--match-ignore-place-p (symbol)
"Return non-nil if SYMBOL is a symbol and starts with _."
@@ -1500,13 +1496,13 @@ Note: binding is done according to `-let*'."
(declare (debug ((&rest (sexp form)) form body))
(indent 2))
(->> vars-vals
- (--mapcat (dash--match (car it) (cadr it)))
- (--reduce-r-from
- (let ((var (car it))
- (val (cadr it)))
- `(let ((,var ,val))
- (if ,var ,acc ,@else)))
- then)))
+ (--mapcat (dash--match (car it) (cadr it)))
+ (--reduce-r-from
+ (let ((var (car it))
+ (val (cadr it)))
+ `(let ((,var ,val))
+ (if ,var ,acc ,@else)))
+ then)))
(defmacro -if-let (var-val then &rest else)
"If VAL evaluates to non-nil, bind it to VAR and do THEN,
- [elpa] externals/dash 63fa64f 368/426: Add links to references in readme, (continued)
- [elpa] externals/dash 63fa64f 368/426: Add links to references in readme, Phillip Lord, 2015/08/04
- [elpa] externals/dash d459b49 374/426: Fix typo, Phillip Lord, 2015/08/04
- [elpa] externals/dash 9e1a667 360/426: Do not map nodes on conses (be consistent with tree map), Phillip Lord, 2015/08/04
- [elpa] externals/dash 7185db8 311/426: [Issue #83] Add `step` to `-slice`, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2b69c14 411/426: Add dash.info and dash.texi to repo, Phillip Lord, 2015/08/04
- [elpa] externals/dash c61fc34 417/426: Add -remove-first/last, -map-first/last, -replace-first/last, Phillip Lord, 2015/08/04
- [elpa] externals/dash fb51f8f 304/426: Merge pull request #88 from steventlamb/topic/zip_cycle_pad, Phillip Lord, 2015/08/04
- [elpa] externals/dash d0c6fc0 371/426: Merge pull request #104 from fbergroth/linkify-docs, Phillip Lord, 2015/08/04
- [elpa] externals/dash c08fcba 299/426: Fixed documentation of `-last-item'., Phillip Lord, 2015/08/04
- [elpa] externals/dash f96196a 289/426: Merge pull request #75 from Fuco1/prefix, Phillip Lord, 2015/08/04
- [elpa] externals/dash afe2781 388/426: Merge pull request #109 from bbatsov/threading-indentation,
Phillip Lord <=
- [elpa] externals/dash 6b64ea7 303/426: Add functions for flexibly zipping uneven lists, Phillip Lord, 2015/08/04
- [elpa] externals/dash cd137e0 310/426: `-slice` should not fill the returned list with nils if to > length, Phillip Lord, 2015/08/04
- [elpa] externals/dash 5219ac0 422/426: [-let] Eliminate useless re-binding of symbols when sources are immutable, Phillip Lord, 2015/08/04
- [elpa] externals/dash a06e66e 382/426: Add test for clean byte compilation, Phillip Lord, 2015/08/04
- [elpa] externals/dash 43dcd37 295/426: Only eval NUM in --dotimes once, Phillip Lord, 2015/08/04
- [elpa] externals/dash 4ecfea6 296/426: Merge pull request #79 from Fuco1/debug-forms, Phillip Lord, 2015/08/04
- [elpa] externals/dash 624c501 306/426: Add `-table` and `-table-flat`, Phillip Lord, 2015/08/04
- [elpa] externals/dash cf7ca23 415/426: [Fix #97] Add -remove-item, Phillip Lord, 2015/08/04
- [elpa] externals/dash 2eefbec 386/426: Don't use an inline comment on a line of its own, Phillip Lord, 2015/08/04
- [elpa] externals/dash bbc1d9c 309/426: `--each-while` should also expose `it-index`, Phillip Lord, 2015/08/04