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

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

[elpa] externals/osm 2fbf12f0ef 46/77: seq is not needed


From: ELPA Syncer
Subject: [elpa] externals/osm 2fbf12f0ef 46/77: seq is not needed
Date: Mon, 7 Mar 2022 08:58:07 -0500 (EST)

branch: externals/osm
commit 2fbf12f0ef096cca0402f681d44c8d3fb04abfc9
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    seq is not needed
---
 osm.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/osm.el b/osm.el
index 53ad847661..7c3c6f669c 100644
--- a/osm.el
+++ b/osm.el
@@ -30,7 +30,6 @@
 
 ;;; Code:
 
-(require 'seq)
 (eval-when-compile (require 'cl-lib))
 
 (defvar bookmark-current-bookmark)
@@ -554,12 +553,11 @@ We need two distinct images which are not `eq' for the 
display properties.")
             (osm--display-tile x y tile)
             (unless tile (osm--enqueue x y)))))
       (setq osm--queue
-            (seq-sort-by
-             (pcase-lambda (`(,x ,y . ,_z))
-               (setq x (- x (/ osm--x 256))
-                     y (- y (/ osm--y 256)))
-               (+ (* x x) (* y y)))
-             #'< osm--queue))
+            (sort osm--queue
+                  (pcase-lambda (`(,x1 ,y1 . ,_z1) `(,x2 ,y2 . ,_z2))
+                    (setq x1 (- x1 (/ osm--x 256)) y1 (- y1 (/ osm--y 256))
+                          x2 (- x2 (/ osm--x 256)) y2 (- y2 (/ osm--y 256)))
+                    (< (+ (* x1 x1) (* y1 y1)) (+ (* x2 x2) (* y2 y2))))))
       (osm--download))))
 
 (defun osm--make-bookmark ()



reply via email to

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