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

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

[nongnu] elpa/annotate b032d2afe0 116/372: - changed function name: 'mov


From: ELPA Syncer
Subject: [nongnu] elpa/annotate b032d2afe0 116/372: - changed function name: 'move-lines' -> 'beginning-of-nth-line'.
Date: Fri, 4 Feb 2022 16:58:24 -0500 (EST)

branch: elpa/annotate
commit b032d2afe0249569da5b1b9dfe54c7e6b5b24259
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>

    - changed function name: 'move-lines' -> 'beginning-of-nth-line'.
---
 annotate.el | 53 +++++++++++++++++++++++++++--------------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

diff --git a/annotate.el b/annotate.el
index 9ee7c87b12..90aa001e17 100644
--- a/annotate.el
+++ b/annotate.el
@@ -975,32 +975,33 @@ essentially what you get from:
 
 (defun annotate-create-annotation (start end &optional text sample)
   "Create a new annotation for selected region."
-  (cl-labels ((create-annotation (start end annotation-text)
-                                 (let ((highlight (make-overlay start end)))
-                                   (overlay-put highlight 'face 
'annotate-highlight)
-                                   (overlay-put highlight 'annotation 
annotation)))
-              (move-lines        (start line-count)
-                                 (save-excursion
-                                   (goto-char start)
-                                   (forward-line line-count)
-                                   (beginning-of-line)
-                                   (point)))
-              (go-backward       (start)
-                                 (move-lines start -2))
-              (go-forward        (start)
-                                 (move-lines start 2))
-              (guess-match-and-add (start end sample max)
-                                   (cl-block surrounding
-                                     (while (< start max)
-                                       (let ((to-match (ignore-errors
-                                                         
(buffer-substring-no-properties start end))))
-                                         (if (and to-match
-                                                  (string= to-match sample))
-                                             (cl-return-from surrounding 
start))
-                                         (progn
-                                           (setf start (1+ start)
-                                                 end   (1+ end)))))
-                                     nil)))
+  (cl-labels ((create-annotation     (start end annotation-text)
+                                     (let ((highlight (make-overlay start 
end)))
+                                       (overlay-put highlight 'face 
'annotate-highlight)
+                                       (overlay-put highlight 'annotation 
annotation)))
+              (beginning-of-nth-line (start line-count)
+                                     (save-excursion
+                                       (goto-char start)
+                                       (forward-line line-count)
+                                       (beginning-of-line)
+                                       (point)))
+              (go-backward           (start)
+                                     (beginning-of-nth-line start -2))
+              (go-forward            (start)
+                                     (beginning-of-nth-line start 2))
+              (guess-match-and-add   (start end sample max)
+                                     (cl-block surrounding
+                                       (while (< start max)
+                                         (let ((to-match (ignore-errors
+                                                           
(buffer-substring-no-properties start
+                                                                               
            end))))
+                                           (if (and to-match
+                                                    (string= to-match sample))
+                                               (cl-return-from surrounding 
start))
+                                           (progn
+                                             (setf start (1+ start)
+                                                   end   (1+ end)))))
+                                       nil)))
     (let ((annotation (or text
                           (read-from-minibuffer "Annotation: "))))
       (when (not (or (null annotation)



reply via email to

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