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

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

[nongnu] elpa/swsw 09bb140ee3 096/146: * swsw.el (swsw-update): Use 'dot


From: ELPA Syncer
Subject: [nongnu] elpa/swsw 09bb140ee3 096/146: * swsw.el (swsw-update): Use 'dotimes' instead of 'while'
Date: Wed, 25 May 2022 02:59:51 -0400 (EDT)

branch: elpa/swsw
commit 09bb140ee34c16b77bba93cdbe2563291d002dbf
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>

    * swsw.el (swsw-update): Use 'dotimes' instead of 'while'
---
 swsw.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/swsw.el b/swsw.el
index 133ad2f929..9d33cdf27a 100644
--- a/swsw.el
+++ b/swsw.el
@@ -207,10 +207,9 @@ If set to ‘lighter’, use the mode line lighter of 
‘swsw-mode’."
   (set-keymap-parent swsw--id-map swsw-command-map)
   (setq swsw--id-counter nil
         swsw-window-count 0)
-  (let ((acc 0) (len (swsw--get-id-length)))
-    (while (< acc len)
-      (push 0 swsw--id-counter)
-      (setq acc (1+ acc))))
+  ;; Clear and resize ‘swsw--id-counter’ according to the ID length.
+  (dotimes (_var (swsw--get-id-length))
+    (push 0 swsw--id-counter))
   (walk-windows #'swsw-update-window nil (swsw--get-scope)))
 
 ;;;; Display functions:



reply via email to

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