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

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

[elpa] externals/mct cf99cc1f5c 12/64: Define placeholder predicate for


From: ELPA Syncer
Subject: [elpa] externals/mct cf99cc1f5c 12/64: Define placeholder predicate for in-region mode
Date: Thu, 30 Dec 2021 23:57:51 -0500 (EST)

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

    Define placeholder predicate for in-region mode
---
 mct.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mct.el b/mct.el
index df12951050..d0c5fe8e7b 100644
--- a/mct.el
+++ b/mct.el
@@ -304,6 +304,14 @@ Meant to be added to `after-change-functions'."
               (buf (window-buffer win)))
       (buffer-local-value 'mct--active buf)))
 
+;; TODO 2021-12-27: If we want to make a buffer-local variant, then we
+;; need to behave like `mct--active-p', because checking for
+;; `completion-in-region-mode' will always fail while in the
+;; Completions' buffer.
+(defun mct--region-p ()
+  "Return non-nil if Mct is completing in region."
+  (bound-and-true-p mct-region-mode))
+
 (defun mct--display-completion-list-advice (&rest app)
   "Prepare advice around `display-completion-list'.
 Apply APP by first let binding the `completions-format' to



reply via email to

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