branch: externals/ivy-posframe
commit 716ce629c8d4b1d95aa9b8d8c90f7d4e0a17f048
Author: conao3 <[email protected]>
Commit: conao3 <[email protected]>
refactoring; using let-environment
---
ivy-posframe.el | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6e6a20f..a150473 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -458,19 +458,15 @@ selection, non-nil otherwise."
:global t
:lighter " ivy-pf"
:group 'ivy-posframe
- (if ivy-posframe-mode
- (eval
- `(progn
- (mapcar (lambda (fn)
- `(push `(,fn :cleanup ivy-posframe-cleanup)
ivy-display-functions-props))
- ivy-posframe-display-functions)
- (mapcar (lambda (elm)
- `(advice-add ',(car elm) :around #',(cdr elm)))
- ivy-posframe-advice-alist)
- (mapcar (lambda (elm)
- (let ((map (nth 0 elm)) (key (nth 1 elm)) (cmd (nth 2
elm)))
- `(define-key ,map ,key ',cmd)))
- ivy-posframe-keybind-list)))))
+ (let ((fncs ivy-posframe-display-functions)
+ (advs ivy-posframe-advice-alist)
+ (keys ivy-posframe-keybind-list))
+ (if ivy-posframe-mode
+ (eval
+ `(progn
+ (mapcar (lambda (elm) `(push `(,elm :cleanup ivy-posframe-cleanup)
ivy-display-functions-props)) fncs)
+ (mapcar (lambda (elm) `(advice-add ',(car elm) :around #',(cdr
elm))) vars)
+ (mapcar (lambda (elm) `(define-key ,(nth 0 elm) ,(nth 1 elm)
',(nth 2 elm)) keys)))))))
;;;###autoload
(defun ivy-posframe-demo ()