[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct cca3aaa8c4 2/2: Remove code that was meant for Emac
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct cca3aaa8c4 2/2: Remove code that was meant for Emacs 27 (not supported anymore) |
Date: |
Tue, 28 Mar 2023 00:58:09 -0400 (EDT) |
branch: externals/mct
commit cca3aaa8c40fe25926767e26b9f1927aeae7826b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Remove code that was meant for Emacs 27 (not supported anymore)
---
mct.el | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/mct.el b/mct.el
index 3cd547b5e3..168628bcec 100644
--- a/mct.el
+++ b/mct.el
@@ -517,11 +517,7 @@ by `mct--completions-window-name'."
(defun mct--completion-at-point-p ()
"Return non-nil if there is a completion at point."
- (let ((point (point)))
- ;; The `or' is for Emacs 27 where there are no completion--string
- ;; properties.
- (or (get-text-property point 'completion--string)
- (get-text-property point 'mouse-face))))
+ (get-text-property (point) 'completion--string))
(defun mct--arg-completion-point-p (arg)
"Return non-nil if ARGth next completion exists."
@@ -832,20 +828,13 @@ Apply APP while inhibiting modification hooks."
"Priority used on the `mct--highlight-overlay'.
This value means that it is overriden by the active region.")
-;; This is for Emacs 27 which does not have a completion--string text
-;; property.
-(defun mct--completions-text-property-search ()
- "Search for text property of completion candidate."
- (or (text-property-search-forward 'completion--string)
- (text-property-search-forward 'mouse-face)))
-
;; The `if-let' is to prevent highlighting of empty space, such as by
;; clicking on it with the mouse.
(defun mct--completions-completion-beg ()
"Return point of completion candidate at START and END."
(if-let ((string (mct--completion-at-point-p)))
(save-excursion
- (prop-match-beginning (mct--completions-text-property-search)))
+ (prop-match-beginning (text-property-search-forward
'completion--string)))
(point)))
;; Same as above for the `if-let'.