[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm f0159ee7d9 5/9: Remove osm-bookmark-click
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm f0159ee7d9 5/9: Remove osm-bookmark-click |
Date: |
Fri, 22 Dec 2023 12:58:27 -0500 (EST) |
branch: externals/osm
commit f0159ee7d9db3cc565f4b614004fba5040a3af6f
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Remove osm-bookmark-click
---
README.org | 6 +++---
osm.el | 18 +++++++-----------
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/README.org b/README.org
index 332ab36f71..5fc343e84d 100644
--- a/README.org
+++ b/README.org
@@ -83,7 +83,7 @@ afterwards.
link has the form ~(osm 51.49 -0.14 11)~.
Bookmarks and Org links can be created at point by clicking with the mouse. See
-the docstrings of the commands ~osm-bookmark-click~ and ~osm-org-link-click~.
+the docstrings of the commands ~osm-bookmark-set~ and ~osm-org-link~.
**** Org link examples
@@ -145,8 +145,8 @@ Some additional key bindings are available in Osm buffers:
- ~+~, ~SPC~: =osm-zoom-in= - Zoom in
- ~-~, ~S-SPC~: =osm-zoom-out= - Zoom out
- ~<mouse-1>~: =osm-click= - Place pin at point
-- ~<mouse-2>~: =osm-org-link-click= - Store point as Org link
-- ~<mouse-3>~: =osm-bookmark-click= - Store point as bookmark
+- ~<mouse-2>~: =osm-org-link= - Store point as Org link
+- ~<mouse-3>~: =osm-bookmark-set= - Store point as bookmark
- ~S-<mouse-1>~: =osm-track-click= - Create track pin to measure distance
- ~<osm-bookmark mouse-*>~: =osm-bookmark-delete-click= - Click on bookmark at
point to delete
- ~<down-mouse-*>~: =osm-mouse-drag= - Drag the map with the mouse
diff --git a/osm.el b/osm.el
index 75c6905485..4f612f43b6 100644
--- a/osm.el
+++ b/osm.el
@@ -278,8 +278,8 @@ Should be at least 7 days according to the server usage
policies."
"SPC" #'osm-zoom-in
"S-SPC" #'osm-zoom-out
"<mouse-1>" #'osm-click
- "<mouse-2>" #'osm-org-link-click
- "<mouse-3>" #'osm-bookmark-click
+ "<mouse-2>" #'osm-org-link
+ "<mouse-3>" #'osm-bookmark-set
"S-<down-mouse-1>" #'ignore
"S-<mouse-1>" #'osm-track-click
"<down-mouse-1>" #'osm-mouse-drag
@@ -703,13 +703,7 @@ Should be at least 7 days according to the server usage
policies."
len1 (length (member sel osm--track)) len2
(length osm--track)))))))
-(defun osm-bookmark-click (event)
- "Create bookmark at position of click EVENT."
- (interactive "@e")
- (osm--select-pin-event event 'osm-bookmark "New Bookmark")
- (osm-bookmark-set))
-
-(defun osm-org-link-click (event)
+(defun osm-org-link (event)
"Store link at position of click EVENT."
(interactive "@e")
(osm--select-pin-event event 'osm-selected "New Org Link")
@@ -1478,6 +1472,8 @@ When called interactively, call the function `osm-home'."
(defun osm--fetch-location-data (name)
"Fetch location info for NAME."
+ (when (mouse-event-p last-input-event)
+ (osm--select-pin-event last-input-event 'osm-selected name))
(let ((lat (or (car osm--selected-pin) osm--lat))
(lon (or (cadr osm--selected-pin) osm--lon)))
(osm--select-pin 'osm-selected lat lon name 'quiet)
@@ -1772,8 +1768,8 @@ The properties are checked as keyword arguments. See
#'osm-zoom-out #'osm-zoom-in #'osm-bookmark-set
#'osm-gpx-hide
#'osm-save-url))
(put sym 'command-modes '(osm-mode)))
-(dolist (sym (list #'osm-mouse-drag #'osm-click #'osm-org-link-click
- #'osm-pin-click #'osm-bookmark-click #'osm-track-click))
+(dolist (sym (list #'osm-mouse-drag #'osm-click #'osm-org-link
+ #'osm-pin-click #'osm-track-click))
(put sym 'completion-predicate #'ignore))
(provide 'osm)
- [elpa] externals/osm updated (2b62c42f15 -> 01dc16ac90), ELPA Syncer, 2023/12/22
- [elpa] externals/osm a1df32a268 2/9: Do not use osm-bookmark-click for selection, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 3bd1266561 1/9: Rename variable and function, ELPA Syncer, 2023/12/22
- [elpa] externals/osm f0159ee7d9 5/9: Remove osm-bookmark-click,
ELPA Syncer <=
- [elpa] externals/osm 88cb802d82 4/9: osm--fetch-location-data: Remove id argument, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 9651d597a9 3/9: Simplify pin selection, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 30684d1481 6/9: Various refactorings, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 01dc16ac90 9/9: Add osm-max-cache, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 83aadc823d 7/9: Shorten some names, ELPA Syncer, 2023/12/22
- [elpa] externals/osm 4e31c4feae 8/9: Shorten variable names, ELPA Syncer, 2023/12/22