[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 0c30cdb 034/110: avy.el (avy-action-yank): Add and bind to

From: Oleh Krehel
Subject: [elpa] master 0c30cdb 034/110: avy.el (avy-action-yank): Add and bind to "y"
Date: Sat, 11 May 2019 10:15:38 -0400 (EDT)

branch: master
commit 0c30cdba9e601c9e719b8b00101d2af9f93d2042
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]