diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-01-20 01:49:43 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-01-20 01:49:43 -0500 |
commit | c1a295da9b285aecb9e750392f797fde4727bc45 (patch) | |
tree | 67abf19166c091bed948dfd4900744edbd2b0a0a | |
parent | 38acfa7d2d1131ff97d774e6cada26f64b5f3b82 (diff) | |
download | bog-c1a295da9b285aecb9e750392f797fde4727bc45.tar.gz |
bog-list-orphan-citekeys: Fix sorting in Emacs 25
-rw-r--r-- | bog.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -493,8 +493,12 @@ file." (insert "\n") (dolist (file files) (let* ((text-cks (bog-non-heading-citekeys-in-file file)) - (nohead-cks (nreverse (cl-set-difference text-cks heading-cks - :test #'string=)))) + (nohead-cks (cl-set-difference text-cks heading-cks + :test #'string=))) + ;; As of Emacs 25.1, `cl-set-difference' keeps the order of + ;; LIST1 rather than leaving it reversed. + (unless (string-lessp (nth 0 nohead-cks) (nth 1 nohead-cks)) + (setq nohead-cks (nreverse nohead-cks))) (when nohead-cks (insert (format "* %s\n\n%s\n\n" (file-name-nondirectory file) |