[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct a512ebae2a: Fix potential mct-region-mode + corfu-m
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct a512ebae2a: Fix potential mct-region-mode + corfu-mode clash |
Date: |
Tue, 18 Jan 2022 14:57:39 -0500 (EST) |
branch: externals/mct
commit a512ebae2a609a034ddd9c1f28efe70da87c1329
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Fix potential mct-region-mode + corfu-mode clash
We simply give priority to Corfu.
Thanks to José Antonio Ortega Ruiz for reporting the bug in issue 16:
<https://gitlab.com/protesilaos/mct/-/issues/16>.
---
mct.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/mct.el b/mct.el
index 405c5322a8..f54f4a6a86 100644
--- a/mct.el
+++ b/mct.el
@@ -1113,12 +1113,15 @@ region.")
(defun mct--region-live-completions (&rest _)
"Update the *Completions* buffer.
Meant to be added to `after-change-functions'."
- (when (mct--region-current-buffer)
- (while-no-input
- (condition-case nil
- (save-match-data
- (mct--show-completions))
- (quit (keyboard-quit))))))
+ (when-let (buf (mct--region-current-buffer))
+ ;; TODO 2022-01-18: Do the same for company-mode, but we need to
+ ;; test it as well.
+ (when (null (buffer-local-value 'corfu-mode buf))
+ (while-no-input
+ (condition-case nil
+ (save-match-data
+ (mct--show-completions))
+ (quit (keyboard-quit)))))))
(defun mct--region-live-update ()
"Hook up `mct--region-live-completions'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/mct a512ebae2a: Fix potential mct-region-mode + corfu-mode clash,
ELPA Syncer <=