branch: elpa/evil-numbers
commit 95fd1faf90323f9c95a6f5760aa717bcfb32e8e3
Author: Michael Markert <[email protected]>
Commit: Michael Markert <[email protected]>
Use `while' instead of `do'.
Signed-off-by: Michael Markert <[email protected]>
---
evil-numbers.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/evil-numbers.el b/evil-numbers.el
index aff57a1b79..128d4a08a2 100644
--- a/evil-numbers.el
+++ b/evil-numbers.el
@@ -98,9 +98,9 @@ Fill up to `WIDTH' with `FILLCHAR' (defaults to ?0) if binary
representation of `NUMBER' is smaller."
(let (nums
(fillchar (or fillchar ?0)))
- (do ((num number (truncate num 2)))
- ((= num 0))
- (push (number-to-string (% num 2)) nums))
+ (while (> number 0)
+ (push (number-to-string (% number 2)) nums)
+ (setq number (truncate number 2)))
(let ((len (length nums)))
(apply #'concat
(if (and width (< len width))