branch: externals/denote
commit 5ce665d9e459166cad90b00e4ebbe2c87373422b
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make stylistic change to denote-retrieve-xref-alist
    
    The functionality to sort query buffers was introduced by Lucas
    Quintana in pull request 594: 
<https://github.com/protesilaos/denote/pull/594>.
    
    Lucas has assigned copyright to the Free Software Foundation.
---
 denote.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/denote.el b/denote.el
index 1397bdb73d..900668d235 100644
--- a/denote.el
+++ b/denote.el
@@ -2505,12 +2505,11 @@ If FILES is not given, use all text files as returned by
             (if (and files (listp files))
                 files
               (denote-directory-files files denote-query--omit-current 
:text-only))))))
-    (if (not denote-query-sorting)
-        data
-      ;; Sort results
-      (let* ((files-matched (mapcar #'car data))
-             (files-sorted (denote-sort-files files-matched 
denote-query-sorting)))
-        (mapcar (lambda (x) (assoc x data)) files-sorted)))))
+    (if-let* ((sort denote-query-sorting)
+              (files-matched (mapcar #'car data))
+              (files-sorted (denote-sort-files files-matched sort)))
+        (mapcar (lambda (x) (assoc x data)) files-sorted)
+      data)))
 
 ;;;; New note
 

Reply via email to