branch: externals/mct
commit e15c5975b75df9a52f3c79508fdf91ce10d5279c
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Put the passlist setup inside of mct--completing-read-advice for consistency
    
    The mct--completing-read-advice has a minibuffer-with-setup-hook
    which already does what we want. Adding a hook separately is not needed.
---
 mct.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mct.el b/mct.el
index d0e3781d15..dd5fcdc4a2 100644
--- a/mct.el
+++ b/mct.el
@@ -561,6 +561,7 @@ Apply APP by first setting up the minibuffer to work with 
Mct."
         (setq-local resize-mini-windows t
                     completion-auto-help t)
         (setq mct--active t)
+        (mct--setup-passlist)
         (mct--setup-live-completions)
         (mct--setup-minibuffer-keymap)
         (mct--setup-shadow-files))
@@ -1117,7 +1118,6 @@ Do this under any of the following conditions:
       (progn
         (setq completions-sort #'mct-sort-multi-category)
         (add-hook 'completion-list-mode-hook #'mct--setup-completion-list)
-        (add-hook 'minibuffer-setup-hook #'mct--setup-passlist)
         (advice-add #'completing-read-default :around 
#'mct--completing-read-advice)
         (advice-add #'completing-read-multiple :around 
#'mct--completing-read-advice)
         (when (and mct-completing-read-multiple-indicator (< 
emacs-major-version 31))
@@ -1136,7 +1136,6 @@ Do this under any of the following conditions:
         (advice-add #'minibuffer-message :around #'mct--honor-inhibit-message))
     (setq completions-sort mct-last-completions-sort-value)
     (remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
-    (remove-hook 'minibuffer-setup-hook #'mct--setup-passlist)
     (advice-remove #'completing-read-default #'mct--completing-read-advice)
     (advice-remove #'completing-read-multiple #'mct--completing-read-advice)
     (advice-remove #'completing-read-multiple #'mct--crm-indicator)

Reply via email to