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

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

[elpa] externals/osm da25f3fe7b 2/2: Minor cleanup


From: ELPA Syncer
Subject: [elpa] externals/osm da25f3fe7b 2/2: Minor cleanup
Date: Sat, 19 Mar 2022 16:57:38 -0400 (EDT)

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

    Minor cleanup
---
 osm.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/osm.el b/osm.el
index fc5eb6098a..adbeefe055 100644
--- a/osm.el
+++ b/osm.el
@@ -1329,10 +1329,7 @@ If the prefix argument LUCKY is non-nil take the first 
result and jump there."
                           nil nil nil 'osm--search-history)
          current-prefix-arg))
   ;; TODO add search bounded to current viewbox, bounded=1, viewbox=x1,y1,x2,y2
-  (let* ((json (osm--get-json
-                (concat 
"https://nominatim.openstreetmap.org/search?format=json&q=";
-                        (url-encode-url search))))
-         (results (mapcar
+  (let* ((results (mapcar
                    (lambda (x)
                      (let ((lat (string-to-number (alist-get 'lat x)))
                            (lon (string-to-number (alist-get 'lon x))))
@@ -1341,7 +1338,11 @@ If the prefix argument LUCKY is non-nil take the first 
result and jump there."
                                   lat lon)
                          ,lat ,lon
                          ,@(mapcar #'string-to-number (alist-get 'boundingbox 
x)))))
-                   (or json (error "No results"))))
+                   (or
+                    (osm--get-json
+                     (concat 
"https://nominatim.openstreetmap.org/search?format=json&q=";
+                             (url-encode-url search)))
+                    (error "No results"))))
          (selected (or
                     (and (or lucky (not (cdr results))) (cdar results))
                     (cdr (assoc



reply via email to

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