[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct a6dac17d1c 59/64: Review mct--region-p for buffer-l
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct a6dac17d1c 59/64: Review mct--region-p for buffer-local mode |
Date: |
Thu, 30 Dec 2021 23:58:01 -0500 (EST) |
branch: externals/mct
commit a6dac17d1cc040e24fd6c22f723ea1487cdf3e2b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Review mct--region-p for buffer-local mode
---
mct.el | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/mct.el b/mct.el
index d861008c64..75ed91ba7c 100644
--- a/mct.el
+++ b/mct.el
@@ -306,11 +306,10 @@ Meant to be added to `after-change-functions'."
(buf (window-buffer win)))
(buffer-local-value 'mct--active buf)))
-;; TODO 2021-12-29: If we want to make a buffer-local variant, then we
-;; need to review this.
(defun mct--region-p ()
"Return non-nil if Mct is completing in region."
- (and (bound-and-true-p mct-region-mode) (mct--region-current-buffer)))
+ (with-current-buffer (mct--region-current-buffer)
+ (bound-and-true-p mct-region-mode)))
(defun mct--display-completion-list-advice (&rest app)
"Prepare advice around `display-completion-list'.
@@ -1219,9 +1218,6 @@ minibuffer)."
(defun mct--region-setup-completion-list ()
"Set up the completion-list for Mct."
- ;; TODO 2021-12-30: If we are to make mct-region-mode local, we need
- ;; to change how this is handled because, e.g., the Completions are
- ;; not cleaned up and highlighting is not available.
(when (mct--region-p)
(setq-local completion-show-help nil
truncate-lines t)
@@ -1243,7 +1239,7 @@ minibuffer)."
;; nothing is hindering us from offering mct-region-mode as a local mode. In
;; contrast, for mct-minibuffer-mode, offering a buffer-local mode does not
;; make sense.
- :global t
+ :global nil
(if mct-region-mode
(progn
(advice-add #'completion--done :around #'mct--region-completion-done)
- [elpa] externals/mct fb177ace70 18/64: Keep "next or mini" intact (we'll use another fn), (continued)
- [elpa] externals/mct fb177ace70 18/64: Keep "next or mini" intact (we'll use another fn), ELPA Syncer, 2021/12/30
- [elpa] externals/mct f3d86fe28a 06/64: Rename internal function, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 72a1c3e6f4 22/64: Minor changes to doc strings, ELPA Syncer, 2021/12/30
- [elpa] externals/mct dedb62cce5 23/64: Implement next/prev candidate or quit completions, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6bb328a795 24/64: Merge branch 'main' into experiment-completion-in-region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct a3edf3ce5a 28/64: Remove obsolete function, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 85d05c08b6 33/64: Remove superfluous comment, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 6a1835cf00 48/64: Remove mct--region-buf, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 771fb8b3cb 54/64: Make in-region prev motion work at all times, ELPA Syncer, 2021/12/30
- [elpa] externals/mct e4b49f40f1 58/64: Add TODO about local mct-region-mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct a6dac17d1c 59/64: Review mct--region-p for buffer-local mode,
ELPA Syncer <=
- [elpa] externals/mct 59431a2622 61/64: Provide global variant of mct-region-mode, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 9e81e4425a 64/64: Complete key bindings of next/prev group motions, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 740d9f5d7d 01/64: Do not bind while-no-input-ignore-events, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 0c575c23c4 04/64: Add TODO: mct-region-mode could be buffer local, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 2413746369 11/64: Merge 'main' into experiment-completion-in-region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 90aa42f432 13/64: Style the completions regardless of mct variant, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 236e03fd5e 08/64: Install advice to silence messages in region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 8958528d2e 21/64: Merge branch 'main' into experiment-completion-in-region, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 53dc6be137 20/64: Write routines for next/prev/directional motions, ELPA Syncer, 2021/12/30
- [elpa] externals/mct 639add9b8e 25/64: Merge 'main' into experiment-completion-in-region, ELPA Syncer, 2021/12/30