emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ivy-posframe 1e602a7 1/4: * ivy-posframe.el (ivy-posfra


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 1e602a7 1/4: * ivy-posframe.el (ivy-posframe--swiper-avy-candidate): Do not use cl-letf
Date: Fri, 9 Oct 2020 01:19:24 -0400 (EDT)

branch: externals/ivy-posframe
commit 1e602a7bf66a5d9c97069c48eec2a10aaef0b421
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * ivy-posframe.el (ivy-posframe--swiper-avy-candidate): Do not use cl-letf
---
 ivy-posframe.el | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index d3ee6d1..f1b9ecb 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -435,8 +435,20 @@ This variable is useful for `ivy-posframe-read-action' .")
 
 (defun ivy-posframe--swiper-avy-candidate ()
   "Ivy-posframe's `swiper--avy-candidate'."
-  (cl-letf (((symbol-function 'swiper--avy-candidates) 
#'ivy-posframe--swiper-avy-candidates))
-    (swiper--avy-candidate)))
+  (let ((candidates (ivy-posframe--swiper-avy-candidates))
+        (avy-all-windows nil))
+    (unwind-protect
+        (prog2
+            (avy--make-backgrounds
+             (append (avy-window-list)
+                     (list (ivy-state-window ivy-last))))
+            (if (eq avy-style 'de-bruijn)
+                (avy-read-de-bruijn candidates avy-keys)
+              (avy-read (avy-tree candidates avy-keys)
+                        #'avy--overlay-post
+                        #'avy--remove-leading-chars))
+          (avy-push-mark))
+      (avy--done))))
 
 (defun ivy-posframe--swiper-avy-goto (candidate)
   "Ivy-posframe's `swiper--avy-goto'."



reply via email to

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