branch: externals/denote
commit f23f84c6e3c9bd0786a574f1d01d4e9fc5dfd79f
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Rename the function denote-sequence-convert to 
denote-sequence-make-conversion
    
    The old name is better for a command.
---
 denote-sequence.el   |  2 +-
 tests/denote-test.el | 44 ++++++++++++++++++++++----------------------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/denote-sequence.el b/denote-sequence.el
index 852f2086c8..f250bc57f9 100644
--- a/denote-sequence.el
+++ b/denote-sequence.el
@@ -258,7 +258,7 @@ has the same meaning as in `denote-sequence-and-scheme-p'."
                              parts)))
       (denote-sequence-join converted-parts 'alphanumeric))))
 
-(defun denote-sequence-convert (string &optional string-is-sequence)
+(defun denote-sequence-make-conversion (string &optional string-is-sequence)
   "Convert STRING to its counterpart sequencing scheme.
 If STRING-IS-SEQUENCE then assume STRING to be a complete sequence, in
 which case convert the entirety of it.  Also see `denote-sequence-scheme'."
diff --git a/tests/denote-test.el b/tests/denote-test.el
index 193768faf6..999d3131c6 100644
--- a/tests/denote-test.el
+++ b/tests/denote-test.el
@@ -682,28 +682,28 @@ Use the functions `denote-sequence--get-new-child' and
                (equal (denote-sequence-split "1=1=2") '("1" "1" "2"))
                (equal (denote-sequence-split "1za5zx") '("1" "za" "5" "zx")))))
 
-(ert-deftest dt-denote-sequence-convert ()
-  "Test that `denote-sequence-convert' converts from alpha to numeric and vice 
versa."
-  (should (and (string= (denote-sequence-convert "3") "c")
-               (string= (denote-sequence-convert "18") "r")
-               (string= (denote-sequence-convert "26") "z")
-               (string= (denote-sequence-convert "27") "za")
-               (string= (denote-sequence-convert "130") "zzzzz")
-               (string= (denote-sequence-convert "131") "zzzzza")
-               (string= (denote-sequence-convert "c") "3")
-               (string= (denote-sequence-convert "r") "18")
-               (string= (denote-sequence-convert "z") "26")
-               (string= (denote-sequence-convert "za") "27")
-               (string= (denote-sequence-convert "zzzzz") "130")
-               (string= (denote-sequence-convert "zzzzza") "131")))
-  (should (and (string= (denote-sequence-convert "1=1=2" :string-is-sequence) 
"1a2")
-               (string= (denote-sequence-convert "1a2" :string-is-sequence) 
"1=1=2")
-               (string= (denote-sequence-convert "1=27=2=55" 
:string-is-sequence) "1za2zzc")
-               (string= (denote-sequence-convert "1za2zzc" 
:string-is-sequence) "1=27=2=55")
-               (string= (denote-sequence-convert "1=1=2=2=4=1" 
:string-is-sequence) "1a2b4a")
-               (string= (denote-sequence-convert "1a2b4a" :string-is-sequence) 
"1=1=2=2=4=1")))
-  (should-error (denote-sequence-convert "111=a" :string-is-sequence))
-  (should-error (denote-sequence-convert "a1" :string-is-sequence)))
+(ert-deftest dt-denote-sequence-make-conversion ()
+  "Test that `denote-sequence-make-conversion' converts from alpha to numeric 
and vice versa."
+  (should (and (string= (denote-sequence-make-conversion "3") "c")
+               (string= (denote-sequence-make-conversion "18") "r")
+               (string= (denote-sequence-make-conversion "26") "z")
+               (string= (denote-sequence-make-conversion "27") "za")
+               (string= (denote-sequence-make-conversion "130") "zzzzz")
+               (string= (denote-sequence-make-conversion "131") "zzzzza")
+               (string= (denote-sequence-make-conversion "c") "3")
+               (string= (denote-sequence-make-conversion "r") "18")
+               (string= (denote-sequence-make-conversion "z") "26")
+               (string= (denote-sequence-make-conversion "za") "27")
+               (string= (denote-sequence-make-conversion "zzzzz") "130")
+               (string= (denote-sequence-make-conversion "zzzzza") "131")))
+  (should (and (string= (denote-sequence-make-conversion "1=1=2" 
:string-is-sequence) "1a2")
+               (string= (denote-sequence-make-conversion "1a2" 
:string-is-sequence) "1=1=2")
+               (string= (denote-sequence-make-conversion "1=27=2=55" 
:string-is-sequence) "1za2zzc")
+               (string= (denote-sequence-make-conversion "1za2zzc" 
:string-is-sequence) "1=27=2=55")
+               (string= (denote-sequence-make-conversion "1=1=2=2=4=1" 
:string-is-sequence) "1a2b4a")
+               (string= (denote-sequence-make-conversion "1a2b4a" 
:string-is-sequence) "1=1=2=2=4=1")))
+  (should-error (denote-sequence-make-conversion "111=a" :string-is-sequence))
+  (should-error (denote-sequence-make-conversion "a1" :string-is-sequence)))
 
 (ert-deftest dt-denote-sequence-increment ()
   "Test that `denote-sequence-increment' works with numbers and letters."

Reply via email to