[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct 658666afee 01/12: Make obsolete a var that should b
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct 658666afee 01/12: Make obsolete a var that should be internal |
Date: |
Mon, 31 Jan 2022 08:57:44 -0500 (EST) |
branch: externals/mct
commit 658666afeedf318a15dd0718e4c1003b364d229a
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make obsolete a var that should be internal
It being a defcustom is a legacy design. There is no reason to keep it.
---
mct.el | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/mct.el b/mct.el
index b932873aa7..d19fcc7abe 100644
--- a/mct.el
+++ b/mct.el
@@ -38,12 +38,7 @@
"Extensions for the minibuffer."
:group 'minibuffer)
-(defcustom mct-completion-windows-regexp
- "\\`\\*Completions.*\\*\\'"
- "Regexp to match window names with completion candidates.
-Used by `mct--get-completion-window'."
- :type 'string
- :group 'mct)
+(make-obsolete 'mct-completion-windows-regexp 'mct--completions-window-name
"0.5.0")
(defcustom mct-completion-window-size (cons #'mct--frame-height-fraction 1)
"Set the maximum and minimum height of the Completions' buffer.
@@ -309,6 +304,9 @@ See `mct-minimum-input'."
;;;;; Live-updating Completions' buffer
+(defvar mct--completions-window-name "\\`\\*Completions.*\\*\\'"
+ "Regexp to match window names with completion candidates.")
+
;; Adapted from Omar AntolĂn Camarena's live-completions library:
;; <https://github.com/oantolin/live-completions>.
(defun mct--live-completions-refresh-immediately ()
@@ -493,13 +491,13 @@ Apply APP by first setting up the minibuffer to work with
Mct."
(get-window-with-predicate
(lambda (window)
(string-match-p
- mct-completion-windows-regexp
+ mct--completions-window-name
(buffer-name (window-buffer window))))))
(defun mct--show-completions ()
"Show the completions' buffer."
(let ((display-buffer-alist
- (cons (cons mct-completion-windows-regexp mct-display-buffer-action)
+ (cons (cons mct--completions-window-name mct-display-buffer-action)
display-buffer-alist))
;; don't ring the bell in `minibuffer-completion-help'
;; when <= 1 completion exists.
@@ -528,7 +526,7 @@ The continuous switch is essentially the same as running
succession.
What constitutes a completions' window is ultimately determined
-by `mct-completion-windows-regexp'."
+by `mct--completions-window-name'."
(interactive nil mct-minibuffer-mode)
(let* ((mini (active-minibuffer-window))
(completions (mct--get-completion-window)))
- [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 <=
- [elpa] externals/mct ab19c21471 07/12: Streamline check for {pass, block}list, ELPA Syncer, 2022/01/31
- [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