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

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

[elpa] externals/mct e617bfd0aa 45/64: Remove mct--quit-completion-in-re


From: ELPA Syncer
Subject: [elpa] externals/mct e617bfd0aa 45/64: Remove mct--quit-completion-in-region
Date: Thu, 30 Dec 2021 23:57:59 -0500 (EST)

branch: externals/mct
commit e617bfd0aaedbbb56faaf15d827b285ad743ce15
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Remove mct--quit-completion-in-region
    
    We can bury the completions buffer to achieve the same effect.
---
 mct.el | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/mct.el b/mct.el
index f73abce52a..746da02f21 100644
--- a/mct.el
+++ b/mct.el
@@ -1121,19 +1121,6 @@ region.")
   (setq mct--region-buf (and completion-in-region--data
                              (marker-buffer (nth 0 
completion-in-region--data)))))
 
-(defun mct--region-terminate-completion ()
-  "Terminate completion in region."
-  (when-let ((buf mct--region-buf))
-    (with-current-buffer buf
-      (completion-in-region-mode -1)
-      (keyboard-quit))))
-
-(defun mct--region-focus-current-buffer ()
-  "Focus the buffer where `completion-in-region' is active."
-  (interactive nil mct-region-mode)
-  (when-let ((buf (mct--region-current-buffer)))
-    (select-window (get-buffer-window buf))))
-
 (defun mct--region-live-completions (&rest _)
   "Update the *Completions* buffer.
 Meant to be added to `after-change-functions'."
@@ -1173,12 +1160,6 @@ current completion session."
   (when (mct--region-p)
     (mct--completions-choose-completion)))
 
-(defun mct--quit-completion-in-region ()
-  "Bury the Completions and terminate completion in region."
-  (quit-window nil (mct--get-completion-window))
-  (mct--region-focus-current-buffer)
-  (mct--region-terminate-completion))
-
 (defun mct-next-completion-or-quit (&optional arg)
   "Move to next completion or bury the Completions' buffer.
 
@@ -1193,7 +1174,7 @@ minibuffer)."
   (let ((count (or arg 1)))
     (cond
      ((mct--bottom-of-completions-p count)
-      (mct--quit-completion-in-region))
+      (minibuffer-hide-completions))
      (t
       (mct--next-completion count)))))
 
@@ -1212,7 +1193,7 @@ minibuffer)."
     (when (mct--region-p)
       (cond
        ((mct--top-of-completions-p count)
-        (mct--quit-completion-in-region))
+        (minibuffer-hide-completions))
        (t
         (mct--previous-completion count))))))
 



reply via email to

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