[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm e6caf26619: Turn `osm' into a function
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm e6caf26619: Turn `osm' into a function |
Date: |
Wed, 4 Jan 2023 17:58:25 -0500 (EST) |
branch: externals/osm
commit e6caf266192554d8d4d5ca01ad91f736d02f3062
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Turn `osm' into a function
This was changed at the request of Stefan Monnier. See the discussion in
#29.
---
README.org | 8 ++++----
osm.el | 18 +++++++++---------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/README.org b/README.org
index 3aea90d40c..c66715bd65 100644
--- a/README.org
+++ b/README.org
@@ -95,11 +95,11 @@ location. The Elisp links can be used in arbitrary text
files. Since they are
Elisp s-expressions they can be easily manipulated programatically.
#+begin_src emacs-lisp
- (osm 41.869561 12.458496 6 opentopomap "Lazio, Italia")
+ (osm 41.869561 12.458496 6 'opentopomap "Lazio, Italia")
(osm 51.489507 -0.144196 11 "London, Greater London, England, SW1A 2DX,
United Kingdom")
- (osm 55.686875 12.569733 12 cyclosm "København, Københavns Kommune, Region
Hovedstaden, 1357, Danmark")
- (osm 40.729568 -73.979187 12 stamen-watercolor "New York County, New York,
United States")
- (osm 27.961656 86.892242 13 opentopomap "Khumjung, Khumbupasanglahmu,
सोलुखुम्बु, Province #1, Nepal")
+ (osm 55.686875 12.569733 12 'cyclosm "København, Københavns Kommune, Region
Hovedstaden, 1357, Danmark")
+ (osm 40.729568 -73.979187 12 'stamen-watercolor "New York County, New York,
United States")
+ (osm 27.961656 86.892242 13 'opentopomap "Khumjung, Khumbupasanglahmu,
सोलुखुम्बु, Province #1, Nepal")
(osm "Tour Eiffel, Av. Gustave Eiffel, Paris") ;; Address link
#+end_src
diff --git a/osm.el b/osm.el
index 81aedc6116..19b927b76c 100644
--- a/osm.el
+++ b/osm.el
@@ -1304,19 +1304,19 @@ Optionally place transient pin with ID and NAME."
nil)
;;;###autoload
-(defmacro osm (&rest link)
- "Go to LINK."
+(defun osm (&rest link)
+ "Go to LINK.
+When called interactively, call `osm-home'."
+ (interactive (list 'home))
(pcase link
+ ('(home)
+ (osm-home))
(`(,lat ,lon ,zoom . ,server)
(setq server (car server))
(unless (and server (symbolp server)) (setq server nil)) ;; Ignore comment
- `(progn
- (osm--goto ,lat ,lon ,zoom ',server 'osm-link "Elisp Link")
- '(osm ,lat ,lon ,zoom ,@(and server (list server)))))
+ (osm--goto lat lon zoom server 'osm-link "Elisp Link"))
((and `(,search) (guard (stringp search)))
- `(progn
- (osm-search ,search)
- '(osm ,search)))
+ (osm-search search))
(_ (error "Invalid osm link"))))
;;;###autoload
@@ -1568,7 +1568,7 @@ If the prefix argument LUCKY is non-nil take the first
result and jump there."
lat lon osm--zoom
(if (eq osm-server (default-value 'osm-server))
""
- (format " %s" osm-server))
+ (format " '%s" osm-server))
(if loc (format " %S" loc) ""))))
(kill-new link)
(message "Stored in the kill ring: %s" link)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/osm e6caf26619: Turn `osm' into a function,
ELPA Syncer <=