[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm 305aea000b 03/77: Use cl-loop
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm 305aea000b 03/77: Use cl-loop |
Date: |
Mon, 7 Mar 2022 08:58:03 -0500 (EST) |
branch: externals/osm
commit 305aea000bcf6a09c5148feabd1ca72c7b7e1a30
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use cl-loop
---
osm.el | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/osm.el b/osm.el
index df44d9c753..19f4141c89 100644
--- a/osm.el
+++ b/osm.el
@@ -196,18 +196,16 @@ Should be at least 7 days according to the server usage
policies."
"Zoom N times into the map."
(interactive "p")
(setq n (or n 1))
- (while (> n 0)
- (when (< osm--zoom (osm--server-property :max-zoom))
- (setq osm--zoom (1+ osm--zoom)
- osm--x (* osm--x 2)
- osm--y (* osm--y 2)))
- (cl-decf n))
- (while (< n 0)
- (when (> osm--zoom (osm--server-property :min-zoom))
- (setq osm--zoom (1- osm--zoom)
- osm--x (/ osm--x 2)
- osm--y (/ osm--y 2)))
- (cl-incf n))
+ (cl-loop for i from n above 0
+ if (< osm--zoom (osm--server-property :max-zoom)) do
+ (setq osm--zoom (1+ osm--zoom)
+ osm--x (* osm--x 2)
+ osm--y (* osm--y 2)))
+ (cl-loop for i from n below 0
+ if (> osm--zoom (osm--server-property :min-zoom)) do
+ (setq osm--zoom (1- osm--zoom)
+ osm--x (/ osm--x 2)
+ osm--y (/ osm--y 2)))
(osm--update))
(defun osm-smaller (&optional n)
- [elpa] externals/osm 11a04bb5b9 66/77: osm-server: Improve completion command, (continued)
- [elpa] externals/osm 11a04bb5b9 66/77: osm-server: Improve completion command, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 88e7e36e43 49/77: Rename function, ELPA Syncer, 2022/03/07
- [elpa] externals/osm a9d0ec74e3 07/77: Simplify placeholder, ELPA Syncer, 2022/03/07
- [elpa] externals/osm db20223911 27/77: Minor cleanup, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 92fb0c72dd 62/77: Add osm-bookmark-delete, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 6f14067777 26/77: add mwheel scroll functions, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 9ffe9592ba 55/77: Simplify code, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 28afc293f9 47/77: Improve bookmark and Org link support, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 5af320c57f 10/77: Add Stamen servers, support jpeg tiles, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 593b95a50c 17/77: Add more maps, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 305aea000b 03/77: Use cl-loop,
ELPA Syncer <=
- [elpa] externals/osm 5f002af18c 24/77: Fix file extraction, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 5f47b77d20 45/77: Move predeclared variables, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 585346b5e0 53/77: Improve bookmark command, ELPA Syncer, 2022/03/07
- [elpa] externals/osm fce584fbae 60/77: Add osm-bookmark-delete-click, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 591d783065 36/77: README: Improve documentation, ELPA Syncer, 2022/03/07