branch: externals/vertico
commit d87ecd792a8d60f381262ed08721f56c55e93a00
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Minor cleanup
---
vertico.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/vertico.el b/vertico.el
index 460fc94428..71f64a5222 100644
--- a/vertico.el
+++ b/vertico.el
@@ -746,12 +746,10 @@ When the prefix argument is 0, the group order is reset."
(define-minor-mode vertico-mode
"VERTical Interactive COmpletion."
:global t :group 'vertico
- (if vertico-mode
- (progn
- (advice-add #'completing-read-default :around #'vertico--advice)
- (advice-add #'completing-read-multiple :around #'vertico--advice))
- (advice-remove #'completing-read-default #'vertico--advice)
- (advice-remove #'completing-read-multiple #'vertico--advice)))
+ (dolist (fun '(completing-read-default completing-read-multiple))
+ (if vertico-mode
+ (advice-add fun :around #'vertico--advice)
+ (advice-remove fun #'vertico--advice))))
;; Emacs 28: Do not show Vertico commands in M-X
(dolist (sym '(vertico-next vertico-next-group vertico-previous
vertico-previous-group