emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/mct c86bb91f99 1/2: Deprecate mct-region-completions-fo


From: ELPA Syncer
Subject: [elpa] externals/mct c86bb91f99 1/2: Deprecate mct-region-completions-format
Date: Thu, 27 Jan 2022 13:58:09 -0500 (EST)

branch: externals/mct
commit c86bb91f997f2b8f6ea145fd4d9e608517bf84c9
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Deprecate mct-region-completions-format
    
    It sets a bad precedent to have user options for the minibuffer and
    region modes.  The functionality of the two is not exactly the same.  We
    will then have to maintain all sorts of exceptions and checks, making
    things more complex/fragile.
---
 README.org |  9 ---------
 mct.el     | 22 ++++------------------
 2 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/README.org b/README.org
index 5bb799dd5f..ac54ddb1a2 100644
--- a/README.org
+++ b/README.org
@@ -457,15 +457,6 @@ out of the =*Completions*=.
 To cancel in-buffer completion, type =C-g= either before switching to the
 Completions' buffer or while inside of it.
 
-#+vindex: mct-region-completions-format
-The only customization option for ~mct-region-mode~ pertains to the
-presentation of the =*Completions*=: ~mct-region-completions-format~.  By
-default, it uses the same style as ~mct-completions-format~, though it can
-be configured to, for example, display candidates in a grid with either
-of the =horizontal= or =vertical= values (on Emacs 27, candidates are always
-displayed in a grid, as the =one-column= layout was introduced in Emacs
-28).
-
 * Installation
 :PROPERTIES:
 :CUSTOM_ID: h:1b501ed4-f16c-4118-9a4a-7a5e29143077
diff --git a/mct.el b/mct.el
index 0790152aa5..1784504fb3 100644
--- a/mct.el
+++ b/mct.el
@@ -174,17 +174,7 @@ See `completions-format' for possible values."
   :type '(choice (const horizontal) (const vertical) (const one-column))
   :group 'mct)
 
-(defcustom mct-region-completions-format mct-completions-format
-  "The Completions' appearance used by `mct-region-mode'.
-See `completions-format' for possible values.
-
-This is like `mct-completions-format' when performing in-buffer
-completion."
-  :type '(choice (variable :tag "Inherit value of `mct-completions-format'" 
mct-completions-format)
-                 (const horizontal)
-                 (const vertical)
-                 (const one-column))
-  :group 'mct)
+(make-obsolete 'mct-region-completions-format 'mct-completions-format "0.5.0")
 
 ;;;; Completion metadata
 
@@ -348,7 +338,7 @@ Apply APP by first let binding the `completions-format' to
 Apply APP by first let binding the `completions-format' to
 `mct-completions-format'."
   (if (mct--region-p)
-      (let ((completions-format mct-region-completions-format))
+      (let ((completions-format mct-completions-format))
         (apply app)
         (mct--fit-completions-window))
     (apply app)))
@@ -435,12 +425,8 @@ Apply APP by first setting up the minibuffer to work with 
Mct."
 ;; We need this to make things work on Emacs 27.
 (defun mct--one-column-p ()
   "Test if we have a one-column view available."
-  (when (>= emacs-major-version 28)
-    (cond
-     ((mct--region-p)
-      (eq mct-region-completions-format 'one-column))
-     ((mct--minibuffer-p)
-      (eq mct-completions-format 'one-column)))))
+  (and (eq mct-completions-format 'one-column)
+       (> emacs-major-version 28)))
 
 ;;;;; Focus minibuffer and/or show completions
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]