branch: externals/matlab-mode
commit 55a899eac9e3bd80814a048fef5b60dea83c4b13
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>

    matlab-ts-mode: update to use latest matlab tree-sitter
    
    Now using https://github.com/acristoffers/tree-sitter-matlab/commits/main/
    37941b272862ba52983f44cb6ec7b0eec6972c95 (technically the corresponding 
version
    on the abi/14 branch).
    
    This removes all *.skip.txt.
---
 .../font_lock_error.skip.txt                       |  3 --
 .../indent_xr_i_cont_incomplete2.m                 |  3 ++
 .../indent_xr_i_cont_incomplete2.skip.txt          |  1 -
 .../indent_xr_i_cont_incomplete2_expected.org      | 54 ++++++++++-----------
 .../indent_xr_next_line_matcher1.m                 |  1 +
 .../indent_xr_next_line_matcher1.skip.txt          |  1 -
 .../indent_xr_next_line_matcher1_expected.org      | 55 +++++++++++++++-------
 7 files changed, 68 insertions(+), 50 deletions(-)

diff --git a/tests/test-matlab-ts-mode-font-lock-files/font_lock_error.skip.txt 
b/tests/test-matlab-ts-mode-font-lock-files/font_lock_error.skip.txt
deleted file mode 100644
index 200874cc05..0000000000
--- a/tests/test-matlab-ts-mode-font-lock-files/font_lock_error.skip.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Remove when these are addressed
-  https://github.com/acristoffers/tree-sitter-matlab/issues/50
-  https://github.com/acristoffers/tree-sitter-matlab/issues/36
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.m 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.m
index 37b2db853e..61de124716 100644
--- a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.m
+++ b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.m
@@ -1,4 +1,7 @@
 % -*- matlab-ts -*-
+%
+% See: https://github.com/acristoffers/tree-sitter-matlab/issues/51
+%
 % (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
 function result = indent_xr_i_cont_incomplete2(a, b)
 end
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.skip.txt
 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.skip.txt
deleted file mode 100644
index f7d67eceae..0000000000
--- 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2.skip.txt
+++ /dev/null
@@ -1 +0,0 @@
-Remove when https://github.com/acristoffers/tree-sitter-matlab/issues/51 is 
fixed
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2_expected.org
 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2_expected.org
index 6e0f726497..a047e197bc 100644
--- 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2_expected.org
+++ 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_i_cont_incomplete2_expected.org
@@ -1,32 +1,32 @@
 #+startup: showall
 
-* Executing commands from indent_xr_i_cont_incomplete2.m:2:2:
+* Executing commands from indent_xr_i_cont_incomplete2.m:5:2:
 
   (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
 
 - Invoking      : "C-n" = next-line
-  Start point   :  205
-  Moved to point:  258
-  : 3:52: function result = indent_xr_i_cont_incomplete2(a, b)
+  Start point   :  277
+  Moved to point:  330
+  : 6:52: function result = indent_xr_i_cont_incomplete2(a, b)
   :                                                           ^
   No buffer modifications
 
 - Invoking      : "C-e" = move-end-of-line
-  Start point   :  258
+  Start point   :  330
   No point movement
   No buffer modifications
 
 - Invoking      : "C-m" = newline
-  Start point   :  258
-  Moved to point:  263
-  : 4:4:     
+  Start point   :  330
+  Moved to point:  335
+  : 7:4:     
   :          ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -1,4 +1,5 @@
- % -*- matlab-ts -*-
+@@ -4,4 +4,5 @@
+ %
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
  function result = indent_xr_i_cont_incomplete2(a, b)
 +    
@@ -34,16 +34,16 @@
   #+end_src diff
 
 - Invoking      : (insert "result = 1 + myfcn(a, b) + ...")
-  Start point   :  263
-  Moved to point:  293
-  : 4:34:     result = 1 + myfcn(a, b) + ...
+  Start point   :  335
+  Moved to point:  365
+  : 7:34:     result = 1 + myfcn(a, b) + ...
   :                                         ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -1,5 +1,5 @@
- % -*- matlab-ts -*-
+@@ -4,5 +4,5 @@
+ %
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
  function result = indent_xr_i_cont_incomplete2(a, b)
 -    
@@ -52,15 +52,15 @@
   #+end_src diff
 
 - Invoking      : "C-m" = newline
-  Start point   :  293
-  Moved to point:  302
-  : 5:8:         
+  Start point   :  365
+  Moved to point:  374
+  : 8:8:         
   :              ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -2,4 +2,5 @@
+@@ -5,4 +5,5 @@
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
  function result = indent_xr_i_cont_incomplete2(a, b)
      result = 1 + myfcn(a, b) + ...
@@ -69,15 +69,15 @@
   #+end_src diff
 
 - Invoking      : (insert "b);")
-  Start point   :  302
-  Moved to point:  305
-  : 5:11:         b);
+  Start point   :  374
+  Moved to point:  377
+  : 8:11:         b);
   :                  ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -2,5 +2,5 @@
+@@ -5,5 +5,5 @@
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "result = 1 + myfcn(a, b) + ...") 
"C-m" (insert "b);") (re-search-backward "^fun") (print 
(buffer-substring-no-properties (point) (point-max))))
  function result = indent_xr_i_cont_incomplete2(a, b)
      result = 1 + myfcn(a, b) + ...
@@ -87,14 +87,14 @@
   #+end_src diff
 
 - Invoking      : (re-search-backward "^fun")
-  Start point   :  305
-  Moved to point:  206
-  : 3:0: function result = indent_xr_i_cont_incomplete2(a, b)
+  Start point   :  377
+  Moved to point:  278
+  : 6:0: function result = indent_xr_i_cont_incomplete2(a, b)
   :      ^
   No buffer modifications
 
 - Invoking      : (print (buffer-substring-no-properties (point) (point-max)))
-  Start point   :  206
+  Start point   :  278
   No point movement
   standard-output:
   #+begin_example
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.m 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.m
index 46d586e180..56a2d68a70 100644
--- a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.m
+++ b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.m
@@ -1,3 +1,4 @@
 % -*- matlab-ts -*-
 % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
 classdef indent_xr_next_line_matcher1
+
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.skip.txt
 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.skip.txt
deleted file mode 100644
index 4c685c2d77..0000000000
--- 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1.skip.txt
+++ /dev/null
@@ -1 +0,0 @@
-Need to fix end location after properties.
diff --git 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1_expected.org
 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1_expected.org
index 7370d6f3bf..0d18664b16 100644
--- 
a/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1_expected.org
+++ 
b/tests/test-matlab-ts-mode-indent-xr-files/indent_xr_next_line_matcher1_expected.org
@@ -25,11 +25,12 @@
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -1,3 +1,4 @@
+@@ -1,4 +1,5 @@
  % -*- matlab-ts -*-
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
  classdef indent_xr_next_line_matcher1
 +    
+ 
   #+end_src diff
 
 - Invoking      : (insert "properties")
@@ -41,12 +42,13 @@
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -1,4 +1,4 @@
+@@ -1,5 +1,5 @@
  % -*- matlab-ts -*-
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
  classdef indent_xr_next_line_matcher1
 -    
 +    properties
+ 
   #+end_src diff
 
 - Invoking      : "C-m" = newline
@@ -58,11 +60,12 @@
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -2,3 +2,4 @@
+@@ -2,4 +2,5 @@
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
  classdef indent_xr_next_line_matcher1
      properties
 +        
+ 
   #+end_src diff
 
 - Invoking      : (insert "end")
@@ -74,60 +77,75 @@
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -2,4 +2,4 @@
+@@ -2,5 +2,5 @@
  % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
  classdef indent_xr_next_line_matcher1
      properties
 -        
 +        end
+ 
   #+end_src diff
 
 - Invoking      : "C-i" = indent-for-tab-command
   Start point   :  290
-  No point movement
-  No buffer modifications
+  Moved to point:  286
+  : 5:7:     end
+  :             ^
+  Buffer modified:
+  #+begin_src diff
+--- start_contents
++++ end_contents
+@@ -2,5 +2,5 @@
+ % (t-utils-xr "C-n" "C-e" "C-m" (insert "properties") "C-m" (insert "end") 
"C-i" "C-e" "C-m" (insert "end\n") (re-search-backward "^classdef") (print 
(buffer-substring-no-properties (point) (point-max))))
+ classdef indent_xr_next_line_matcher1
+     properties
+-        end
++    end
+ 
+  #+end_src diff
 
 - Invoking      : "C-e" = move-end-of-line
-  Start point   :  290
+  Start point   :  286
   No point movement
   No buffer modifications
 
 - Invoking      : "C-m" = newline
-  Start point   :  290
-  Moved to point:  291
+  Start point   :  286
+  Moved to point:  287
   : 6:0: 
   :      ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -3,3 +3,4 @@
- classdef indent_xr_next_line_matcher1
+@@ -4,3 +4,4 @@
      properties
-         end
+     end
+ 
 +
   #+end_src diff
 
 - Invoking      : (insert "end
 ")
-  Start point   :  291
-  Moved to point:  295
+  Start point   :  287
+  Moved to point:  291
   : 7:0: 
   :      ^
   Buffer modified:
   #+begin_src diff
 --- start_contents
 +++ end_contents
-@@ -3,4 +3,5 @@
+@@ -3,5 +3,6 @@
  classdef indent_xr_next_line_matcher1
      properties
-         end
+     end
 +end
  
+ 
   #+end_src diff
 
 - Invoking      : (re-search-backward "^classdef")
-  Start point   :  295
+  Start point   :  291
   Moved to point:  226
   : 3:0: classdef indent_xr_next_line_matcher1
   :      ^
@@ -140,8 +158,9 @@
   #+begin_example
 classdef indent_xr_next_line_matcher1
     properties
-        end
+    end
 end
 
+
   #+end_example
   No buffer modifications

Reply via email to