Subject: bug#62086: 29.0.60; ruby-ts-mode regressions

From: Juri Linkov <[email-masked]>
Date: Thu, 09 Mar 2023 19:24:40 +0200

'C-M-f' ('forward-sexp') commands currently are unusable in master
because they skip too much.  So I relied on word motion commands like
'M-f' ('forward-word') to move in ruby-ts-mode.  But unfortunately
some recent change broke even word motion in emacs-29, so no motion commands
can be used in ruby-ts-mode, only motion by characters can be used with
'C-f' ('forward-char').  Here is a recipe for recent regression in emacs-29:

0. emacs -Q
1. C-x C-f test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb RET
2. M-x ruby-ts-mode RET
3. move point to after the first letter 'c'
4. type 'M-f' ('forward-word')

It skips two words in symbols.

I don't know if the second bug is related to this, but while
in the same file, also type 'C-M-l' ('reposition-window').
It raises the error:

  Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
    treesit-end-of-defun()
    end-of-defun(-1)
    reposition-window(nil nil)
    reposition-window(nil 89)
    funcall-interactively(reposition-window nil 89)
    command-execute(reposition-window)

This regression is also recent.