[Top][All Lists]

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

[elpa] externals/mct 099e204 42/70: Make mct-choose-completion-dwim neve

From: ELPA Syncer
Subject: [elpa] externals/mct 099e204 42/70: Make mct-choose-completion-dwim never exit
Date: Thu, 11 Nov 2021 03:57:48 -0500 (EST)

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

    Make mct-choose-completion-dwim never exit
    This is consistent with its behaviour in CRM prompts.
 mct.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/mct.el b/mct.el
index 5989371..013c517 100644
--- a/mct.el
+++ b/mct.el
@@ -663,14 +663,13 @@ Completions' buffer."
 (defun mct-choose-completion-dwim ()
   "Append to minibuffer when at `completing-read-multiple' prompt.
-Otherwise behave like `mct-choose-completion-exit'."
+In any other `completing-read' prompt use `mct-edit-completion'."
   (interactive nil mct-mode)
-  (when (and (derived-mode-p 'completion-list-mode)
-             (active-minibuffer-window))
-    (choose-completion)
-    (with-current-buffer (window-buffer (active-minibuffer-window))
-      (unless (eq (mct--completion-category) 'file)
-        (minibuffer-force-complete))
+  (when-let* ((mini (active-minibuffer-window))
+              (window (mct--get-completion-window))
+              (buffer (window-buffer window)))
+    (mct-edit-completion)
+    (with-current-buffer (window-buffer mini)
       (when crm-completion-table
         ;; FIXME 2021-10-22: How to deal with commands that let-bind the
         ;; crm-separator?  For example: `org-set-tags-command'.

reply via email to

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