emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 03f90af 324/348: ivy.el (ivy-rotate-sort): Guard against n


From: Oleh Krehel
Subject: [elpa] master 03f90af 324/348: ivy.el (ivy-rotate-sort): Guard against nil sort
Date: Sat, 8 Apr 2017 11:04:23 -0400 (EDT)

branch: master
commit 03f90afa25c2efb0cacefa15838a6ddf8185cd67
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    ivy.el (ivy-rotate-sort): Guard against nil sort
    
    Do not attempt to rotate sorting functions if they are nil, as this
    will result in a list of sorting functions equal to '(nil).
---
 ivy.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/ivy.el b/ivy.el
index ea5ce92..a4f9652 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1308,10 +1308,9 @@ This only has an effect if multiple sorting functions are
 specified for the current collection in
 `ivy-sort-functions-alist'."
   (interactive)
-  (let ((cell
-         (assoc (ivy-state-collection ivy-last) ivy-sort-functions-alist)))
-    (when (listp (cdr cell))
-      (setcdr cell (append (cddr cell) (list (cadr cell))))
+  (let ((cell (assoc (ivy-state-collection ivy-last) 
ivy-sort-functions-alist)))
+    (when (consp (cdr cell))
+      (setcdr cell `(,@(cddr cell) ,(cadr cell)))
       (ivy--reset-state ivy-last))))
 
 (defvar ivy-index-functions-alist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]