summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-17 21:45:31 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-17 21:45:31 -0500
commit1e18ce377d133e14baab64483aa1b50a81a63c34 (patch)
tree7ed30a7c106dc4bb41029694b403d1333e3873ed
parentf33f8827b88abe5a0cee8a1ddb50222d4d706338 (diff)
downloadbog-1e18ce377d133e14baab64483aa1b50a81a63c34.tar.gz
Simplify citekey sorting
-rw-r--r--bog.el6
1 files 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