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

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

[elpa] externals/mct 5c8fbb1784 51/64: Simplify mct-choose-completion-no


From: ELPA Syncer
Subject: [elpa] externals/mct 5c8fbb1784 51/64: Simplify mct-choose-completion-no-exit
Date: Thu, 30 Dec 2021 23:58:00 -0500 (EST)

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

    Simplify mct-choose-completion-no-exit
---
 mct.el | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/mct.el b/mct.el
index 63314426e8..fd57d83ae0 100644
--- a/mct.el
+++ b/mct.el
@@ -707,17 +707,12 @@ If ARG is supplied, move that many completion groups at a 
time."
       (choose-completion)))
     (minibuffer-force-complete-and-exit)))
 
-;; TODO review, is this not almost the same as choose-completion?
 (defun mct-choose-completion-no-exit ()
   "Run `choose-completion' in the Completions without exiting."
   (interactive nil mct-minibuffer-mode)
-  (when-let* ((window (mct--get-completion-window))
-              (buffer (window-buffer))
-              (mini (active-minibuffer-window)))
-    ;; TODO review, are we not always in the *Completions* buffer here?
-    (with-current-buffer buffer
-      (let ((completion-no-auto-exit t))
-        (choose-completion)))
+  (when-let ((mini (active-minibuffer-window)))
+    (let ((completion-no-auto-exit t))
+      (choose-completion))
     (select-window mini nil)))
 
 (defvar display-line-numbers-mode)



reply via email to

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