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

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

[elpa] externals/mct 33df7c9b43 13/21: Use line-{beginning, end}-positio


From: ELPA Syncer
Subject: [elpa] externals/mct 33df7c9b43 13/21: Use line-{beginning, end}-position where relevant
Date: Sat, 25 Mar 2023 15:59:01 -0400 (EDT)

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

    Use line-{beginning,end}-position where relevant
---
 mct.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/mct.el b/mct.el
index 26087fba88..c734b872d6 100644
--- a/mct.el
+++ b/mct.el
@@ -289,7 +289,7 @@ affairs."
     (unless (mct--first-line-completion-p)
       (goto-char (point-min))
       (let ((inhibit-read-only t))
-        (delete-region (point-at-bol) (1+ (point-at-eol)))
+        (delete-region (line-beginning-position) (1+ (line-end-position)))
         (insert (propertize " "
                             'cursor-sensor-functions
                             (list
@@ -592,7 +592,7 @@ by `mct--completions-window-name'."
   (mct--switch-to-completions)
   (goto-char (point-max))
   (next-completion -1)
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (unless (mct--completion-at-point-p)
     (next-completion 1))
   (mct--restore-old-point-in-grid (point))
@@ -606,7 +606,7 @@ by `mct--completions-window-name'."
   "Return non-nil if ARGth line is empty."
   (unless (mct--arg-completion-point-p arg)
     (save-excursion
-      (goto-char (point-at-bol))
+      (goto-char (line-beginning-position))
       (and (not (bobp))
               (or (beginning-of-line (1+ arg)) t)
               (save-match-data
@@ -879,9 +879,7 @@ This value means that it is overriden by the active 
region.")
   "Return end of completion candidate."
   (if-let ((string (mct--completion-at-point-p)))
       (save-excursion
-        (if (mct--one-column-p)
-            (1+ (point-at-eol))
-          (prop-match-end (mct--completions-text-property-search))))
+        (1+ (line-end-position)))
     (point)))
 
 (defun mct--overlay-make ()



reply via email to

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