[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct e821821 1/4: All keys should only apply for complet
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct e821821 1/4: All keys should only apply for completions |
Date: |
Tue, 16 Nov 2021 06:59:35 -0500 (EST) |
branch: externals/mct
commit e821821706b6c60bfb674dcb22334329978634af
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
All keys should only apply for completions
This fixes cases where we have no minibuffer completion but MCT commands
are still bound. For example, eval-expression, bound to M-:, does not
perform completion, so MCT should not apply there.
---
mct.el | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/mct.el b/mct.el
index 0d17c5f..3a8d927 100644
--- a/mct.el
+++ b/mct.el
@@ -998,21 +998,24 @@ region.")
(defun mct--completion-list-mode-map ()
"Hook to `completion-setup-hook'."
- (use-local-map
- (make-composed-keymap mct-completion-list-mode-map
- (current-local-map))))
+ (when (mct--completion-category)
+ (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'."
- (use-local-map
- (make-composed-keymap mct-minibuffer-local-completion-map
- (current-local-map))))
-
+ (when (mct--completion-category)
+ (use-local-map
+ (make-composed-keymap mct-minibuffer-local-completion-map
+ (current-local-map)))))
+
(defun mct--minibuffer-local-filename-completion-map ()
"Hook to `minibuffer-setup-hook'."
- (use-local-map
- (make-composed-keymap mct-minibuffer-local-filename-completion-map
- (current-local-map))))
+ (when (mct--completion-category)
+ (use-local-map
+ (make-composed-keymap mct-minibuffer-local-filename-completion-map
+ (current-local-map)))))
;;;;; mct-mode declaration