[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct 555b481fe0 03/64: First steps towards Orderless sup
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct 555b481fe0 03/64: First steps towards Orderless support |
Date: |
Thu, 30 Dec 2021 23:57:49 -0500 (EST) |
branch: externals/mct
commit 555b481fe0706e51f74e06b8a21bb1bf3e067152
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>
First steps towards Orderless support
Override the completion predicate such that
space does not quit the completion.
---
mct.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/mct.el b/mct.el
index e6bbf67cb6..52c3024478 100644
--- a/mct.el
+++ b/mct.el
@@ -421,9 +421,13 @@ Apply APP by first setting up the minibuffer to work with
Mct."
(save-excursion
;; FIXME 2021-12-03: same principle as what I wrote above
;; `mct--region-or-minibuffer-active-p'.
- (if completion-in-region-mode
- (completion-help-at-point)
- (minibuffer-completion-help))))
+ (pcase (and completion-in-region-mode completion-in-region--data)
+ (`(,start ,end ,collection . ,plist)
+ (let ((minibuffer-completion-table collection)
+ (minibuffer-completion-predicate (plist-get plist :predicate))
+ (completion-extra-properties plist))
+ (minibuffer-completion-help start end)))
+ (_ (minibuffer-completion-help)))))
(mct--fit-completions-window))
;;;###autoload
@@ -1140,11 +1144,12 @@ Meant to be added to `after-change-functions'."
;; It cannot be `completion-in-region-mode'.
(defun mct--region-setup-completion-in-region ()
"Set up Mct for `completion-in-region'."
+ ;; NOTE: Ignore the predicate in order to support orderless style.
+ ;; TODO: This override should be guarded by a customizable variable,
+ ;; since it is intrusive. See also `corfu-quit-at-boundary'.
+ (setq completion-in-region-mode--predicate (lambda () t))
(mct--region-live-update))
-;; FIXME 2021-12-03: We cannot use Orderless. Neither the
-;; space-separated approach, nor the style dispatchers.
-
;; FIXME 2021-12-03: When using a flex style followed by tab, the
;; completion-in-region seems to remain active as the echo area has a
;; message about "sole completion", "no completion", and the like.
- [elpa] externals/mct updated (6279fa3e7d -> 9e81e4425a), ELPA Syncer, 2021/12/30
- [elpa] externals/mct cf99cc1f5c 12/64: Define placeholder predicate for in-region mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 92680c1091 05/64: completion--done: Attempt to teardown completion in region properly, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6cd3b20a83 09/64: Add TODO on binding TAB in region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 555b481fe0 03/64: First steps towards Orderless support,
ELPA Syncer <=
- [elpa] externals/mct 5ad44174c8 16/64: Introduce mct-region keymap for completions (WIP), ELPA Syncer, 2021/12/30
- [elpa] externals/mct 788aeafb04 19/64: Rename the minibuffer mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6222731289 10/64: Add new FIXME to exit region completion cleanly, ELPA Syncer, 2021/12/30
- [elpa] externals/mct c79f8c86c9 07/64: Take note of more issues with completion-in-region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 0d7d64d79a 15/64: Add in-region version of choose-completion, ELPA Syncer, 2021/12/30
- [elpa] externals/mct adeddd2dfe 14/64: Write helper for "choose completion" routine, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 298a83cfc5 17/64: Respin the mct setup for in-region scenario (WIP), ELPA Syncer, 2021/12/30
- [elpa] externals/mct 0362ca4bf1 34/64: Rename symbol for consistency, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 28d7c54f51 44/64: Add debug print to monitor completion-in-region-mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct bf0f666ee4 49/64: Replace "mct-mode" with "mct-minibuffer-mode", ELPA Syncer, 2021/12/30