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

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

[elpa] externals/corfu a5eae1b 1/2: Simplify conditional


From: ELPA Syncer
Subject: [elpa] externals/corfu a5eae1b 1/2: Simplify conditional
Date: Mon, 9 Aug 2021 17:57:09 -0400 (EDT)

branch: externals/corfu
commit a5eae1b6a42db609b3286bdacdd7711ab784f47a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Simplify conditional
---
 corfu.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/corfu.el b/corfu.el
index 2456586..85677c8 100644
--- a/corfu.el
+++ b/corfu.el
@@ -717,11 +717,9 @@ completion began less than that number of seconds ago."
   "Go forward N candidates."
   (interactive "p")
   (let ((index (+ corfu--index (or n 1))))
-    (corfu--goto
-     (cond
-      ((not corfu-cycle) index)
-      ((= corfu--total 0) -1)
-      (t (1- (mod (1+ index) (1+ corfu--total))))))))
+    (corfu--goto (if corfu-cycle
+                     (1- (mod (1+ index) (1+ corfu--total)))
+                   index))))
 
 (defun corfu-previous (&optional n)
   "Go backward N candidates."



reply via email to

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