branch: externals/ivy-posframe commit 1e602a7bf66a5d9c97069c48eec2a10aaef0b421 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@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'."