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

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

[elpa] externals/m-buffer 49a0c187a1 026/115: Name changes: markers to m


From: ELPA Syncer
Subject: [elpa] externals/m-buffer 49a0c187a1 026/115: Name changes: markers to marker
Date: Tue, 19 Jul 2022 15:58:46 -0400 (EDT)

branch: externals/m-buffer
commit 49a0c187a175a05bf3aac2fa3819e49e9edebc8a
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Name changes: markers to marker
---
 m-buffer.el           | 38 +++++++++++++++++++-------------------
 test/m-buffer-test.el | 14 +++++++-------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/m-buffer.el b/m-buffer.el
index 0e04535546..9b22bc4a68 100644
--- a/m-buffer.el
+++ b/m-buffer.el
@@ -200,7 +200,7 @@ too."
 (defun m-buffer-match-begin-n (n &rest match)
   "Return markers to the start of the match to the nth group.
 MATCH may be of any form accepted by `m-buffer-ensure-match'. Use
-`m-buffer-nil-markers' after the markers have been finished with
+`m-buffer-nil-marker' after the markers have been finished with
 or they will slow future use of the buffer until garbage collected."
   (-map
    (lambda (m)
@@ -212,15 +212,15 @@ or they will slow future use of the buffer until garbage 
collected."
   "Return positions of the start of the match to the nth group.
 MATCH may be of any form accepted by `m-buffer-ensure-match'. If
 `match-data' is passed markers will be set to nil after this
-function. See `m-buffer-nil-markers' for details."
-  (m-buffer-markers-to-pos-nil
+function. See `m-buffer-nil-marker' for details."
+  (m-buffer-marker-to-pos-nil
    (apply 'm-buffer-match-begin-n
           n match)))
 
 (defun m-buffer-match-begin (&rest match)
   "Returns a list of markers to the start of matches.
 MATCH may of any form accepted by `m-buffer-ensure-match'. Use
-`m-buffer-nil-markers' after the markers have been used or they
+`m-buffer-nil-marker' after the markers have been used or they
 will slow future changes to the buffer."
   (apply 'm-buffer-match-begin-n 0 match))
 
@@ -228,14 +228,14 @@ will slow future changes to the buffer."
   "Returns a list of positions at the start of matcher.
 MATCH may be of any form accepted by `m-buffer-ensure-match'.
 If `match-data' is passed markers will be set to nil after this
-function. See `m-buffer-nil-markers' for details."
+function. See `m-buffer-nil-marker' for details."
   (apply 'm-buffer-match-begin-n-pos 0 match))
 
 (defun m-buffer-match-end-n (n &rest match)
   "Returns markers to the end of the match to the nth group.
 MATCH may be of any form accepted by `m-buffer-ensure-match'.
 If `match-data' is passed markers will be set to nil after this
-function. See `m-buffer-nil-markers' for details."
+function. See `m-buffer-nil-marker' for details."
   (-map
    (lambda (m)
      (nth
@@ -247,15 +247,15 @@ function. See `m-buffer-nil-markers' for details."
   "Return positions of the end of the match to the nth group.
 MATCH may be of any form accepted by `m-buffer-ensure-match'.
 If `match-data' is passed markers will be set to nil after this
-function. See `m-buffer-nil-markers' for details."
-  (m-buffer-markers-to-pos-nil
+function. See `m-buffer-nil-marker' for details."
+  (m-buffer-marker-to-pos-nil
    (apply 'm-buffer-match-end-n-pos
           n match)))
 
 (defun m-buffer-match-end (&rest match)
   "Returns a list of markers to the end of matches to regexp in buffer.
 MATCH may be of any form accepted by `m-buffer-ensure-match'. Use
-`m-buffer-nil-markers' after the markers have been used or they
+`m-buffer-nil-marker' after the markers have been used or they
 will slow future changes to the buffer."
   (apply 'm-buffer-match-end-n 0 match))
 
@@ -263,12 +263,12 @@ will slow future changes to the buffer."
   "Returns a list of positions to the end of the matches.
 MATCH may be of any form accepted by `m-buffer-ensure-match'.
 If `match-data' is passed markers will be set to nil after this
-function. See `m-buffer-nil-markers' for details."
-  (m-buffer-markers-to-pos-nil
+function. See `m-buffer-nil-marker' for details."
+  (m-buffer-marker-to-pos-nil
    (apply 'm-buffer-match-end match)))
 
 ;; marker/position utility functions
-(defun m-buffer-nil-markers (markers)
+(defun m-buffer-nil-marker (markers)
   "Takes a (nested) list of markers and nils them all.
 Markers slow buffer movement while they are pointing at a
 specific location, until they have been garbage collected. Niling
@@ -278,11 +278,11 @@ them prevents this. See Info node `(elisp) Overview of 
Markers'."
      (set-marker marker nil))
    (-flatten markers)))
 
-(defun m-buffer-markers-to-pos (markers &optional postnil)
+(defun m-buffer-marker-to-pos (markers &optional postnil)
   "Transforms a list of markers to a list of positions.
 If the markers are no longer needed, set postnil to true, or call
-`m-buffer-nil-markers' manually after use to speed future buffer
-movement. Or use `m-buffer-markers-to-pos-nil'."
+`m-buffer-nil-marker' manually after use to speed future buffer
+movement. Or use `m-buffer-marker-to-pos-nil'."
   (-map
    (lambda (marker)
      (prog1
@@ -291,10 +291,10 @@ movement. Or use `m-buffer-markers-to-pos-nil'."
          (set-marker marker nil))))
    markers))
 
-(defun m-buffer-markers-to-pos-nil (markers)
-  "Transforms a list of MARKERS to a list of positions then nils.
+(defun m-buffer-marker-to-pos-nil (markers)
+  "Transforms a list of MARKER to a list of positions then nils.
 See also `m-buffer-nil-markers'"
-  (m-buffer-markers-to-pos markers t))
+  (m-buffer-marker-to-pos markers t))
 
 (defun m-buffer-marker-tree-to-pos (marker-tree &optional postnil)
   (-tree-map
@@ -308,7 +308,7 @@ See also `m-buffer-nil-markers'"
 (defun m-buffer-marker-tree-to-pos-nil (marker-tree)
   (m-buffer-marker-tree-to-pos marker-tree t))
 
-(defun m-buffer-pos-to-markers (buffer positions)
+(defun m-buffer-pos-to-marker (buffer positions)
   "In BUFFER translates a list of POSITIONS to markers."
   (-map
    (lambda (pos)
diff --git a/test/m-buffer-test.el b/test/m-buffer-test.el
index 1397203c4b..df4e7661b7 100644
--- a/test/m-buffer-test.el
+++ b/test/m-buffer-test.el
@@ -112,10 +112,10 @@
       "^one$")))))
 
 
-(ert-deftest markers-to-pos ()
+(ert-deftest marker-to-pos ()
   (should
    (equal '(1 1 1)
-          (m-buffer-markers-to-pos-nil
+          (m-buffer-marker-to-pos-nil
            (list
             (copy-marker 1)
             (copy-marker 1)
@@ -131,7 +131,7 @@
       (current-buffer)
       "^one$")))))
 
-(ert-deftest m-buffer-nil-markers ()
+(ert-deftest m-buffer-nil-marker ()
   (should
    (m-buffer-wtb-of-file
     "match-data.txt"
@@ -149,7 +149,7 @@
        (and
         (not (marker-position marker))
         (not (marker-buffer marker))))
-     (m-buffer-nil-markers
+     (m-buffer-nil-marker
       (m-buffer-match-begin (current-buffer) "^one$"))))))
 
 
@@ -181,7 +181,7 @@
     '(1 2 3 5 7 10 13)
     (m-buffer-wtb-of-file
      "line-start.txt"
-     (m-buffer-markers-to-pos
+     (m-buffer-marker-to-pos
       (m-buffer-match-line-start (current-buffer)))))))
 
 (ert-deftest line-end ()
@@ -190,7 +190,7 @@
     '(1 2 4 6 9 12 13)
     (m-buffer-wtb-of-file
        "line-start.txt"
-       (m-buffer-markers-to-pos
+       (m-buffer-marker-to-pos
         (m-buffer-match-line-end (current-buffer)))))))
 
 (ert-deftest sentence-end ()
@@ -199,7 +199,7 @@
     '(15 32 48)
     (m-buffer-wtb-of-file
      "sentence-end.txt"
-     (m-buffer-markers-to-pos
+     (m-buffer-marker-to-pos
       (m-buffer-match-sentence-end (current-buffer)))))))
 
 (ert-deftest buffer-for-match ()



reply via email to

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