[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dash 97bd233 231/316: Use lexical binding for -grade-up
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dash 97bd233 231/316: Use lexical binding for -grade-up/down |
Date: |
Mon, 15 Feb 2021 15:58:07 -0500 (EST) |
branch: externals/dash
commit 97bd23330dbd9954daced2e18ec5969e8ab81dfd
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Basil L. Contovounesios <contovob@tcd.ie>
Use lexical binding for -grade-up/down
---
dash.el | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/dash.el b/dash.el
index 5f6b8e5..c7759a1 100644
--- a/dash.el
+++ b/dash.el
@@ -1758,21 +1758,17 @@ Note: `it' need not be used in each form."
"Grade elements of LIST using COMPARATOR relation, yielding a
permutation vector such that applying this permutation to LIST
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))))
+ (->> (--map-indexed (cons it it-index) list)
+ (-sort (lambda (it other) (funcall comparator (car it) (car other))))
+ (-map 'cdr)))
(defun -grade-down (comparator list)
"Grade elements of LIST using COMPARATOR relation, yielding a
permutation vector such that applying this permutation to LIST
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))))
+ (->> (--map-indexed (cons it it-index) list)
+ (-sort (lambda (it other) (funcall comparator (car other) (car it))))
+ (-map 'cdr)))
(defvar dash--source-counter 0
"Monotonic counter for generated symbols.")
- [elpa] externals/dash 6ffcd89 299/316: Print actual error messages in README, (continued)
- [elpa] externals/dash 6ffcd89 299/316: Print actual error messages in README, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 4f3238b 300/316: Strip leading zeros from octal escapes in Emacs 26, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 2028805 302/316: Don't quote error messages in Texinfo examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 6c41b32 301/316: Move case-fold-search binding to where it's used, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1c711f1 303/316: Unquote results in Texinfo examples, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 1bf9ddb 304/316: Makefile aesthetics, ELPA Syncer, 2021/02/15
- [elpa] externals/dash da0415b 312/316: * NEWS.md (2.18): Start news for upcoming release., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 5eea156 315/316: Absorb dash-functional into dash, ELPA Syncer, 2021/02/15
- [elpa] externals/dash eaf33b3 226/316: Add info-lookup-symbol support, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 565055e 229/316: * dash.el (---truthy?): Simplify., ELPA Syncer, 2021/02/15
- [elpa] externals/dash 97bd233 231/316: Use lexical binding for -grade-up/down,
ELPA Syncer <=
- [elpa] externals/dash 1152feb 237/316: Deprecate variadic -list, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 609ac28 245/316: Improve Texinfo markup when documenting errors, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 999cae9 253/316: Fix short-circuiting of --first, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 3726eb1 254/316: Improve the examples of -some, ELPA Syncer, 2021/02/15
- [elpa] externals/dash b0bef0f 276/316: Don't set text-quoting-style globally, ELPA Syncer, 2021/02/15
- [elpa] externals/dash bedc804 282/316: Improve function-to-info, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 9727f7c 288/316: Simplify Lisp -> Texinfo printing, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 7b2584c 294/316: Simplify GitHub link creation, ELPA Syncer, 2021/02/15
- [elpa] externals/dash 7048e68 296/316: Restore some newlines in docstrings, ELPA Syncer, 2021/02/15
- [elpa] externals/dash f6554c3 298/316: Unquote results in README examples, ELPA Syncer, 2021/02/15