avy.el (avy-action-yank): Add and bind to "y"

Fixes #183
This commit is contained in:
Oleh Krehel 2017-03-26 20:57:33 +02:00
parent d609eb98bd
commit 0c30cdba9e

6
avy.el
View File

@ -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)