diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-17 21:45:31 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-17 21:45:31 -0500 |
commit | 1e18ce377d133e14baab64483aa1b50a81a63c34 (patch) | |
tree | 7ed30a7c106dc4bb41029694b403d1333e3873ed | |
parent | f33f8827b88abe5a0cee8a1ddb50222d4d706338 (diff) | |
download | bog-1e18ce377d133e14baab64483aa1b50a81a63c34.tar.gz |
Simplify citekey sorting
-rw-r--r-- | bog.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |