[Top][All Lists]

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

[elpa] master b522bfe 023/110: avy.el (avy-resume): Add

From: Oleh Krehel
Subject: [elpa] master b522bfe 023/110: avy.el (avy-resume): Add
Date: Sat, 11 May 2019 10:15:36 -0400 (EDT)

branch: master
commit b522bfe320ac71d50baa075ae8be7e06c6594816
Author: justbur <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy.el (avy-resume): Add
    Holds last command avy command after user input. This is a quick way to
    bring back the same markers after a jump.
    Fixes #157
 avy.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/avy.el b/avy.el
index 3f0bef0..e076e1c 100644
--- a/avy.el
+++ b/avy.el
@@ -475,6 +475,10 @@ multiple DISPLAY-FN invokations."
          (unless (memq major-mode avy-ignored-modes)
+(defun avy-resume ()
+  "Stub to hold last avy command.
+Commands using `avy-with' macro can be resumed.")
 (defmacro avy-with (command &rest body)
   "Set `avy-keys' according to COMMAND and execute BODY.
 Set `avy-style' according to COMMMAND as well."
@@ -485,6 +489,10 @@ Set `avy-style' according to COMMMAND as well."
          (avy-style (or (cdr (assq ',command avy-styles-alist))
      (setq avy-action nil)
+     (setf (symbol-function 'avy-resume)
+           (lambda ()
+             (interactive)
+             ,@body))
 (defun avy-action-goto (pt)

reply via email to

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