fix(vertico): +vertico/embark-preview bug

- replace obsolete `embark-default-action` with `embark-dwim`
- add `defvar` for `embark-quiet-after-action` to fix lexical var bug
This commit is contained in:
Itai Y. Efrat 2021-07-31 10:50:00 +03:00
parent f7863f96f0
commit 3af07d2500

View file

@ -4,6 +4,10 @@
;;;###autoload
(defvar orderless-match-faces)
;; To prevent "Defining as dynamic an already lexical var" from +vertico/embark-preview
;;;###autoload
(defvar embark-quit-after-action)
;;;###autoload
(defadvice! +vertico--company-capf--candidates-a (fn &rest args)
"Highlight company matches correctly, and try default completion styles before
@ -146,7 +150,7 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
(unless (bound-and-true-p consult--preview-function)
(save-selected-window
(let ((embark-quit-after-action nil))
(embark-default-action)))))
(embark-dwim)))))
;;;###autoload
(defun +vertico/next-candidate-preview (&optional n)