summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2024-03-22 15:06:27 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2024-03-29 11:39:38 +0100
commitcbd862865ff0a08d1214ac33590e7af80d10a0ac (patch)
tree9298ebe07ca5070f1ffdcca7495e0ce150df5771 /lisp
parent92d659ce6cd2e79231f1011202abb39606d6f06b (diff)
downloademacs-cbd862865ff0a08d1214ac33590e7af80d10a0ac.tar.gz
Remove `sort-on` (bug#69709)
* lisp/sort.el (sort-on): * doc/lispref/sequences.texi (Sequence Functions): * etc/NEWS: Remove the `sort-on` function which is now completely superseded by the extended `sort` in features, ease of use, and performance.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/sort.el21
1 files changed, 0 insertions, 21 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index 4f0d759ef8a..2ee76b6e1e3 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -478,27 +478,6 @@ sRegexp specifying key within record: \nr")
;; if there was no such register
(error (throw 'key nil))))))))))
-;;;###autoload
-(defun sort-on (sequence predicate accessor)
- "Sort SEQUENCE by calling PREDICATE on sort keys produced by ACCESSOR.
-SEQUENCE should be the input sequence to sort.
-Elements of SEQUENCE are sorted by keys which are obtained by
-calling ACCESSOR on each element. ACCESSOR should be a function of
-one argument, an element of SEQUENCE, and should return the key
-value to be compared by PREDICATE for sorting the element.
-PREDICATE is the function for comparing keys; it is called with two
-arguments, the keys to compare, and should return non-nil if the
-first key should sort before the second key.
-The return value is always a new list.
-This function has the performance advantage of evaluating
-ACCESSOR only once for each element in the input SEQUENCE, and is
-therefore appropriate when computing the key by ACCESSOR is an
-expensive operation. This is known as the \"decorate-sort-undecorate\"
-paradigm, or the Schwartzian transform."
- (mapcar #'car
- (sort (mapcar #'(lambda (x) (cons x (funcall accessor x))) sequence)
- #'(lambda (x y) (funcall predicate (cdr x) (cdr y))))))
-
(defvar sort-columns-subprocess t)