Skip to content

Commit

Permalink
Work around sorting bug in some Emacsen which dropped the first recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Aug 19, 2023
1 parent 591b42d commit 6309817
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions justl.el
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,10 @@ Logs the command run."
(or (cl-position .name unsorted-recipes :test 'string=)
;; sort private commands last
1000))))
(let-alist parsed
(cl-sort .recipes (lambda (a b) (< (unsorted-index a) (unsorted-index b))))
(let ((recipes-entry (assoc 'recipes parsed)))
(setcdr recipes-entry
(seq-sort (lambda (a b) (< (unsorted-index a) (unsorted-index b)))
(cdr recipes-entry)))
parsed)))))

(defun justl--get-recipes (justfile)
Expand Down

0 comments on commit 6309817

Please sign in to comment.