Skip to content

Commit

Permalink
seq-sort-by unavailable in Emacs 25, so spell it out
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Nov 13, 2024
1 parent d1feb67 commit e1f03fd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions racket-describe.el
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ as invisible text."
((string-equal "" from)
(make-string 16 ?z))
(t from)))
(sort-key (v)
(key (v)
(pcase-let
((`(,what ,from ,fams) (get-text-property 0 'racket-affix v))
(sort (get-text-property 0 'racket-sort v)))
Expand All @@ -728,10 +728,14 @@ as invisible text."
(key< (as bs)
(cl-loop for a in as
for b in bs
unless (generic= a b)
return (generic< a b)
unless (generic= a b) return (generic< a b)
finally return nil)))
(seq-sort-by #'sort-key #'key< strs)))
;; `seq-sort-by' unavailable in Emacs 25, so instead of
;; (seq-sort-by #'key #'key< strs) spell it out:
(seq-sort (lambda (a b)
(key< (key a)
(key b)))
strs)))

(provide 'racket-describe)

Expand Down

0 comments on commit e1f03fd

Please sign in to comment.