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

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

[elpa] externals/which-key 672689aab8 12/12: ; Simplify internal defun


From: ELPA Syncer
Subject: [elpa] externals/which-key 672689aab8 12/12: ; Simplify internal defun
Date: Tue, 9 Apr 2024 15:59:04 -0400 (EDT)

branch: externals/which-key
commit 672689aab8e6b68afa7961fbaa3beaded53b8991
Author: Jeremy Bryant <jb@jeremybryant.net>
Commit: Justin Burkett <justin@burkett.cc>

    ; Simplify internal defun
    
    * which-key.el (which-key--rotate):
    Simplify code slightly.
    
    Co-authored-by: Philip Kaludercic <philipk@posteo.net>
---
 which-key.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/which-key.el b/which-key.el
index 0c38a1a1bc..660ff22801 100644
--- a/which-key.el
+++ b/which-key.el
@@ -729,9 +729,8 @@ Used when `which-key-popup-type' is frame.")
 
 (defun which-key--rotate (list n)
   (let* ((len (length list))
-         (n (if (< n 0) (+ len n) n))
-         (n (mod n len)))
-    (append (last list (- len n)) (butlast list (- len n)))))
+         (n (- len (mod n len))))
+    (append (last list n) (butlast list n))))
 
 (defun which-key--pages-set-current-page (pages-obj n)
   (setf (which-key--pages-pages pages-obj)



reply via email to

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