[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct ab19c21471 07/12: Streamline check for {pass, block
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct ab19c21471 07/12: Streamline check for {pass, block}list |
Date: |
Mon, 31 Jan 2022 08:57:45 -0500 (EST) |
branch: externals/mct
commit ab19c21471a2dd68d1d2f613ae65663825930a28
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Streamline check for {pass,block}list
---
mct.el | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/mct.el b/mct.el
index 78bfaebab2..2feeffe931 100644
--- a/mct.el
+++ b/mct.el
@@ -223,10 +223,20 @@ See `completions-format' for possible values."
'category))))
(defun mct--symbol-in-list (list)
- "Test if symbol of command or category is in LIST."
+ "Test if command or category is in LIST."
(or (memq (mct--this-command) list)
(memq (mct--completion-category) list)))
+(defun mct--passlist-p ()
+ "Return non-nil if symbol is in the `mct-completion-passlist'."
+ (or (memq (mct--this-command) mct-completion-passlist)
+ (memq (mct--completion-category) mct-completion-passlist)))
+
+(defun mct--blocklist-p ()
+ "Return non-nil if symbol is in the `mct-completion-blocklist'."
+ (or (memq (mct--this-command) mct-completion-blocklist)
+ (memq (mct--completion-category) mct-completion-blocklist)))
+
;;;; Basics of intersection between minibuffer and Completions' buffer
(define-obsolete-variable-alias
@@ -350,12 +360,12 @@ Meant to be added to `after-change-functions'."
"Set up the completions' buffer."
(cond
((null mct-live-completion))
- ((mct--symbol-in-list mct-completion-passlist)
+ ((mct--passlist-p)
(setq-local mct-minimum-input 0)
(setq-local mct-live-update-delay 0)
(mct--show-completions)
(add-hook 'after-change-functions #'mct--live-completions-refresh nil t))
- ((not (mct--symbol-in-list mct-completion-blocklist))
+ ((not (mct--blocklist-p))
(add-hook 'after-change-functions #'mct--live-completions-refresh nil t))))
(defvar-local mct--active nil
- [elpa] externals/mct updated (27c93a4932 -> f6610dd69b), ELPA Syncer, 2022/01/31
- [elpa] externals/mct d232c964b7 05/12: Declare commands as applicable to the region mode, ELPA Syncer, 2022/01/31
- [elpa] externals/mct ebe554061b 09/12: Accept nil value for mct-completion-window-size, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 76986b490f 08/12: Add another completion category to the sample, ELPA Syncer, 2022/01/31
- [elpa] externals/mct eb2394372f 04/12: Minor tweak to mct-backward-updir, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 7af0a5e65e 11/12: Rewrite manual to make user options easier to find, ELPA Syncer, 2022/01/31
- [elpa] externals/mct bd2793e531 02/12: Remove out-of-date comment, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 658666afee 01/12: Make obsolete a var that should be internal, ELPA Syncer, 2022/01/31
- [elpa] externals/mct ab19c21471 07/12: Streamline check for {pass, block}list,
ELPA Syncer <=
- [elpa] externals/mct 7df5c4e4a0 03/12: Fix Emacs version check for one-column, ELPA Syncer, 2022/01/31
- [elpa] externals/mct e8acbe114c 10/12: Minor refinements to doc strings, ELPA Syncer, 2022/01/31
- [elpa] externals/mct d8c90ea987 06/12: Fix otherwise brilliant typo, ELPA Syncer, 2022/01/31
- [elpa] externals/mct f6610dd69b 12/12: Implement dynamic completion setup, ELPA Syncer, 2022/01/31