[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct 442178b 1/2: Only try to live-update Completions wh
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct 442178b 1/2: Only try to live-update Completions when necessary |
Date: |
Tue, 16 Nov 2021 07:59:31 -0500 (EST) |
branch: externals/mct
commit 442178b192ec61d80b04733a3cbf38480b81a35d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Only try to live-update Completions when necessary
---
mct.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/mct.el b/mct.el
index 46e50ae..701bea0 100644
--- a/mct.el
+++ b/mct.el
@@ -326,17 +326,18 @@ Meant to be added to `after-change-functions'."
(defun mct--setup-completions ()
"Set up the completions' buffer."
- (cond
- ((memq this-command mct-completion-passlist)
- (setq-local mct-minimum-input 0)
- (setq-local mct-live-update-delay 0)
- (mct--show-completions)
- (add-hook 'after-change-functions #'mct--live-completions nil t))
- ((null mct-live-completion))
- ((not (memq this-command mct-completion-blocklist))
- (if (eq mct-live-completion 'visible)
- (add-hook 'after-change-functions
#'mct--live-completions-visible-timer nil t)
- (add-hook 'after-change-functions #'mct--live-completions-timer nil
t)))))
+ (when (mct--completion-category)
+ (cond
+ ((memq this-command mct-completion-passlist)
+ (setq-local mct-minimum-input 0)
+ (setq-local mct-live-update-delay 0)
+ (mct--show-completions)
+ (add-hook 'after-change-functions #'mct--live-completions nil t))
+ ((null mct-live-completion))
+ ((not (memq this-command mct-completion-blocklist))
+ (if (eq mct-live-completion 'visible)
+ (add-hook 'after-change-functions
#'mct--live-completions-visible-timer nil t)
+ (add-hook 'after-change-functions #'mct--live-completions-timer nil
t))))))
;;;;; Alternating backgrounds (else "stripes")