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

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

[elpa] externals/mct caf99a4 2/2: Fix how non-completion commands are ha


From: ELPA Syncer
Subject: [elpa] externals/mct caf99a4 2/2: Fix how non-completion commands are handled
Date: Tue, 16 Nov 2021 07:59:32 -0500 (EST)

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

    Fix how non-completion commands are handled
---
 mct.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/mct.el b/mct.el
index 701bea0..0a60443 100644
--- a/mct.el
+++ b/mct.el
@@ -206,6 +206,10 @@ NOTE that setting this option with `setq' requires a 
restart of
 
 ;;;; Basics of intersection between minibuffer and Completions' buffer
 
+(defvar mct--no-complete-functions
+  '(eval-expression)
+  "List of functions that do not do completion.")
+
 (define-obsolete-variable-alias
   'mct-hl-line 'mct-highlight-candidate "0.3.0")
 
@@ -326,7 +330,7 @@ Meant to be added to `after-change-functions'."
 
 (defun mct--setup-completions ()
   "Set up the completions' buffer."
-  (when (mct--completion-category)
+  (unless (memq this-command mct--no-complete-functions)
     (cond
      ((memq this-command mct-completion-passlist)
       (setq-local mct-minimum-input 0)
@@ -1007,14 +1011,14 @@ region.")
 
 (defun mct--completion-list-mode-map ()
   "Hook to `completion-setup-hook'."
-  (when (mct--completion-category)
+  (unless (memq this-command mct--no-complete-functions)
     (use-local-map
      (make-composed-keymap mct-completion-list-mode-map
                            (current-local-map)))))
 
 (defun mct--minibuffer-local-completion-map ()
   "Hook to `minibuffer-setup-hook'."
-  (when (mct--completion-category)
+  (unless (memq this-command mct--no-complete-functions)
     (use-local-map
      (make-composed-keymap mct-minibuffer-local-completion-map
                            (current-local-map)))))



reply via email to

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