branch: master
commit 0c30cdba9e601c9e719b8b00101d2af9f93d2042
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
avy.el (avy-action-yank): Add and bind to "y"
Fixes #183
---
avy.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/avy.el b/avy.el
index bd96bf6..c82e0d3 100644
--- a/avy.el
+++ b/avy.el
@@ -134,6 +134,7 @@ If the commands isn't on the list, `avy-style' is used."
(?X . avy-action-kill-stay)
(?m . avy-action-mark)
(?n . avy-action-copy)
+ (?y . avy-action-yank)
(?i . avy-action-ispell))
"List of actions for `avy-handler-default'.
@@ -532,6 +533,11 @@ Set `avy-style' according to COMMMAND as well."
(select-window (cdr dat))
(goto-char (car dat))))
+(defun avy-action-yank (pt)
+ "Yank sexp starting at PT at the current point."
+ (avy-action-copy pt)
+ (yank))
+
(defun avy-action-kill-move (pt)
"Kill sexp at PT and move there."
(goto-char pt)