[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm e78a337477 44/77: Rename commands
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm e78a337477 44/77: Rename commands |
Date: |
Mon, 7 Mar 2022 08:58:06 -0500 (EST) |
branch: externals/osm
commit e78a337477268dfa1887bdd99b587406b72692d5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Rename commands
---
README.org | 1 +
osm.el | 48 ++++++++++++++++++++++++------------------------
2 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/README.org b/README.org
index df02910ef6..e7aefb2cb0 100644
--- a/README.org
+++ b/README.org
@@ -47,6 +47,7 @@ Top-level commands:
Key bindings in =osm-mode= buffer:
- ~+~ and ~-~: Zooming
+- ~<mouse-1>~: Zoom to point
- ~<arrow>~: Small step scrolling
- ~C-<arrow>~, ~M-<arrow>~: Large step scrolling
- ~g~: =osm-goto=
diff --git a/osm.el b/osm.el
index 4a689de25c..192c785cfd 100644
--- a/osm.el
+++ b/osm.el
@@ -121,22 +121,22 @@ Should be at least 7 days according to the server usage
policies."
(defvar osm-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "+" #'osm-larger)
- (define-key map "-" #'osm-smaller)
- (define-key map [mouse-1] #'osm-click)
+ (define-key map "+" #'osm-zoom-in)
+ (define-key map "-" #'osm-zoom-out)
+ (define-key map [mouse-1] #'osm-zoom-click)
(define-key map [drag-mouse-1] #'osm-drag)
(define-key map [up] #'osm-up)
(define-key map [down] #'osm-down)
(define-key map [left] #'osm-left)
(define-key map [right] #'osm-right)
- (define-key map [C-up] #'osm-up-large)
- (define-key map [C-down] #'osm-down-large)
- (define-key map [C-left] #'osm-left-large)
- (define-key map [C-right] #'osm-right-large)
- (define-key map [M-up] #'osm-up-large)
- (define-key map [M-down] #'osm-down-large)
- (define-key map [M-left] #'osm-left-large)
- (define-key map [M-right] #'osm-right-large)
+ (define-key map [C-up] #'osm-up-up)
+ (define-key map [C-down] #'osm-down-down)
+ (define-key map [C-left] #'osm-left-left)
+ (define-key map [C-right] #'osm-right-right)
+ (define-key map [M-up] #'osm-up-up)
+ (define-key map [M-down] #'osm-down-down)
+ (define-key map [M-left] #'osm-left-left)
+ (define-key map [M-right] #'osm-right-right)
(define-key map "c" #'clone-buffer)
(define-key map "h" #'osm-home)
(define-key map "g" #'osm-goto)
@@ -326,14 +326,14 @@ We need two distinct images which are not `eq' for the
display properties.")
(osm--download)))))
(osm--download))))
-(defun osm-click (event)
+(defun osm-zoom-click (event)
"Handle click EVENT."
(interactive "e")
(pcase-let ((`(,x . ,y) (posn-x-y (event-start event))))
(when (< osm--zoom (osm--server-property :max-zoom))
(cl-incf osm--x (- x osm--wx))
(cl-incf osm--y (- y osm--wy))
- (osm-larger))))
+ (osm-zoom-in))))
(defun osm-drag (event)
"Handle drag EVENT."
@@ -344,7 +344,7 @@ We need two distinct images which are not `eq' for the
display properties.")
(cl-incf osm--y (- sy ey))
(osm--update)))
-(defun osm-larger (&optional n)
+(defun osm-zoom-in (&optional n)
"Zoom N times into the map."
(interactive "p")
(setq n (or n 1))
@@ -360,10 +360,10 @@ We need two distinct images which are not `eq' for the
display properties.")
osm--y (/ osm--y 2)))
(osm--update))
-(defun osm-smaller (&optional n)
+(defun osm-zoom-out (&optional n)
"Zoom N times out of the map."
(interactive "p")
- (osm-larger (- (or n 1))))
+ (osm-zoom-in (- (or n 1))))
(defun osm--move (dx dy step)
"Move by DX/DY with STEP size."
@@ -394,25 +394,25 @@ We need two distinct images which are not `eq' for the
display properties.")
(interactive "p")
(osm-right (- (or n 1))))
-(defun osm-right-large (&optional n)
+(defun osm-right-right (&optional n)
"Move N large stepz to the right."
(interactive "p")
(osm--move (or n 1) 0 osm-large-step))
-(defun osm-down-large (&optional n)
+(defun osm-down-down (&optional n)
"Move N large stepz down."
(interactive "p")
(osm--move 0 (or n 1) osm-large-step))
-(defun osm-up-large (&optional n)
+(defun osm-up-up (&optional n)
"Move N large stepz up."
(interactive "p")
- (osm-down-large (- (or n 1))))
+ (osm-down-down (- (or n 1))))
-(defun osm-left-large (&optional n)
+(defun osm-left-left (&optional n)
"Move N large stepz to the left."
(interactive "p")
- (osm-right-large (- (or n 1))))
+ (osm-right-right (- (or n 1))))
(defun osm--clean-cache ()
"Clean tile cache."
@@ -721,8 +721,8 @@ We need two distinct images which are not `eq' for the
display properties.")
(osm--setup nil server))
(dolist (sym (list #'osm-up #'osm-down #'osm-left #'osm-right
- #'osm-up-large #'osm-down-large #'osm-left-large
#'osm-right-large
- #'osm-smaller #'osm-larger))
+ #'osm-up-up #'osm-down-down #'osm-left-left
#'osm-right-right
+ #'osm-zoom-out #'osm-zoom-in))
(put sym 'command-modes '(osm-mode)))
(provide 'osm)
- [elpa] externals/osm d5c5dc6ffd 75/77: Mouse dragging: Check window, (continued)
- [elpa] externals/osm d5c5dc6ffd 75/77: Mouse dragging: Check window, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 162f883f80 35/77: Reuse existing buffer, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 9053d8a930 16/77: Indentation, ELPA Syncer, 2022/03/07
- [elpa] externals/osm f2fba2ebdf 43/77: Auto rename the buffers, ELPA Syncer, 2022/03/07
- [elpa] externals/osm b991de6e89 54/77: Rename server, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 03d4ceb553 57/77: Add tile memory cache, ELPA Syncer, 2022/03/07
- [elpa] externals/osm f6c16a4cc4 63/77: Improve keybindings, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 2a0bd8c7eb 50/77: Improve header line, ELPA Syncer, 2022/03/07
- [elpa] externals/osm e546671a0e 38/77: Minor cleanup, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7657cb1b3b 71/77: Add check for image format support, ELPA Syncer, 2022/03/07
- [elpa] externals/osm e78a337477 44/77: Rename commands,
ELPA Syncer <=
- [elpa] externals/osm 1b7f4020b3 73/77: Fix caching, ELPA Syncer, 2022/03/07
- [elpa] externals/osm d27892f63a 40/77: Add some utility functions, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 3c0950a24b 31/77: Simplify bookmark handling, ELPA Syncer, 2022/03/07
- [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