From a1d9d0e131c59dd0c72073c71402018c97b3c696 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Sat, 19 Aug 2023 08:03:27 +0200 Subject: [PATCH] Work around sorting bug in some Emacsen which dropped the first recipe --- justl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/justl.el b/justl.el index 51430be..c7e72c4 100644 --- a/justl.el +++ b/justl.el @@ -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)