From 1e18ce377d133e14baab64483aa1b50a81a63c34 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 17 Feb 2015 21:45:31 -0500 Subject: Simplify citekey sorting --- bog.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bog.el b/bog.el index 226d3d0..92ed923 100644 --- a/bog.el +++ b/bog.el @@ -424,8 +424,8 @@ is only active if `bog-use-citekey-cache' is non-nil)." (when clear-cache (setq bog--all-heading-citekeys nil)) (let ((bufname "*Bog duplicate heading citekeys*") - (dup-cks (-sort (lambda (x y) (string-lessp x y)) - (bog--find-duplicates (bog-all-heading-citekeys))))) + (dup-cks (sort (bog--find-duplicates (bog-all-heading-citekeys)) + #'string-lessp))) (if (not dup-cks) (message "No duplicate citekeys found") (with-current-buffer (get-buffer-create bufname) @@ -693,7 +693,7 @@ one entry per BibTeX file." (setq citekeys (bog-citekeys-in-buffer))) (setq bib-files (-map #'bog-citekey-as-bib - (-distinct (--sort (string-lessp it other) citekeys)))) + (-distinct (sort citekeys #'string-lessp)))) (with-current-buffer (get-buffer-create bib-buffer-name) (erase-buffer) (--each bib-files -- cgit v1.2.3