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

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

[elpa] externals/mct 020bb45 2/3: Tweak mct--completions-completion-beg


From: ELPA Syncer
Subject: [elpa] externals/mct 020bb45 2/3: Tweak mct--completions-completion-beg for symmetry
Date: Tue, 16 Nov 2021 14:57:20 -0500 (EST)

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

    Tweak mct--completions-completion-beg for symmetry
    
    See commit 0fc7380.
---
 mct.el | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/mct.el b/mct.el
index 0bbd7d9..1242edb 100644
--- a/mct.el
+++ b/mct.el
@@ -927,17 +927,12 @@ This value means that it takes precedence over lines that 
have
 the `mct-stripe' face, while it is overriden by the active
 region.")
 
-;; TODO 2021-11-16: Maybe there is a better way to get the boundaries of
-;; the completion at point?  What we do here saves us from highlighting
-;; empty space.
 (defun mct--completions-completion-beg ()
   "Return point of completion candidate at START and END."
   (if-let ((string (get-text-property (point) 'completion--string)))
       (save-excursion
-        (next-completion -1)
-        (next-completion 1)
-        (point))
-    (point)))
+        (prop-match-beginning (text-property-search-forward 
'completion--string))))
+  (point))
 
 (defun mct--completions-completion-end ()
   "Return end of completion candidate."



reply via email to

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