emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/mct c76a02b: Refine fitting the Completions' buf to its


From: ELPA Syncer
Subject: [elpa] externals/mct c76a02b: Refine fitting the Completions' buf to its window
Date: Thu, 9 Dec 2021 05:57:26 -0500 (EST)

branch: externals/mct
commit c76a02b43f268573ff3624aaf63d7c7cf9ea4dde
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Refine fitting the Completions' buf to its window
    
    This relates to the bug with M-x imenu as reported by Benjamin in issue
    12: <https://gitlab.com/protesilaos/mct/-/issues/12>.
---
 README.org | 6 +++---
 mct.el     | 8 +++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 9bd7d47..2f25d82 100644
--- a/README.org
+++ b/README.org
@@ -695,9 +695,9 @@ MCT is meant to be a collective effort.  Every bit of help 
matters.
 + Contributions to code or documentation :: Daniel Mendler, James Norman
   Vladimir Cash, José Antonio Ortega Ruiz, Philip Kaludercic.
 
-+ Ideas and user feedback :: Case Duckworth, Jonathan Irving, José
-  Antonio Ortega Ruiz, Kostadin Ninev, Manuel Uberti, Philip Kaludercic,
-  Theodor Thornhill.
++ Ideas and user feedback :: Benjamin (@zealotrush), Case Duckworth,
+  Jonathan Irving, José Antonio Ortega Ruiz, Kostadin Ninev, Manuel
+  Uberti, Philip Kaludercic, Theodor Thornhill.
 
 + Inspiration for certain features :: =icomplete.el= (built-in---multiple
   authors), Daniel Mendler (=vertico=), Omar Antolín Camarena (=embark=,
diff --git a/mct.el b/mct.el
index 8c0f8b0..9bfb5d2 100644
--- a/mct.el
+++ b/mct.el
@@ -413,7 +413,11 @@ Apply APP by first setting up the minibuffer to work with 
Mct."
          (cons (cons mct-completion-windows-regexp mct-display-buffer-action)
                display-buffer-alist)))
     (save-excursion (minibuffer-completion-help)))
-  (mct--fit-completions-window))
+  ;; ;; NOTE 2021-12-09: We should no longer have a need for this, as we
+  ;; ;; pass an after advice to `minibuffer-completion-help'.
+  ;;
+  ;; (mct--fit-completions-window)
+  )
 
 ;;;###autoload
 (defun mct-focus-mini-or-completions ()
@@ -1059,6 +1063,7 @@ region.")
         (advice-add #'completing-read-multiple :around 
#'mct--completing-read-advice)
         (advice-add #'completing-read-multiple :filter-args 
#'mct--crm-indicator)
         (advice-add #'display-completion-list :around 
#'mct--display-completion-list-advice)
+        (advice-add #'minibuffer-completion-help :after 
#'mct--fit-completions-window)
         (advice-add #'minibuffer-message :around #'mct--honor-inhibit-message)
         (advice-add #'minibuf-eldef-setup-minibuffer :around 
#'mct--stealthily))
     (remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
@@ -1072,6 +1077,7 @@ region.")
     (advice-remove #'completing-read-multiple #'mct--completing-read-advice)
     (advice-remove #'completing-read-multiple #'mct--crm-indicator)
     (advice-remove #'display-completion-list 
#'mct--display-completion-list-advice)
+    (advice-remove #'minibuffer-completion-help #'mct--fit-completions-window)
     (advice-remove #'minibuffer-message #'mct--honor-inhibit-message)
     (advice-remove #'minibuf-eldef-setup-minibuffer #'mct--stealthily)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]