ruby-ts-mode: Remove some currently unused functions
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--grand-parent-is) (ruby-ts--ancestor-start, ruby-ts--ancestor-is): Remove some currently unused functions.
This commit is contained in:
parent
4561844720
commit
d9ed736f0a
1 changed files with 0 additions and 18 deletions
|
@ -374,25 +374,10 @@ Returns bol of the current line if PRED returns nil."
|
|||
(back-to-indentation)
|
||||
(point)))))
|
||||
|
||||
(defun ruby-ts--grand-parent-is (type)
|
||||
"Check grand parent's type matches regexp TYPE."
|
||||
(lambda (_n parent &rest _)
|
||||
(string-match-p type (treesit-node-type (treesit-node-parent parent)))))
|
||||
|
||||
(defun ruby-ts--grand-parent-node (_n parent &rest _)
|
||||
"Return parent of PARENT node."
|
||||
(treesit-node-parent parent))
|
||||
|
||||
(defun ruby-ts--ancestor-start (type)
|
||||
"Return start of closest ancestor matching regexp TYPE."
|
||||
(lambda (node &rest _)
|
||||
(treesit-node-start (treesit-parent-until node (ruby-ts--type-pred type)))))
|
||||
|
||||
(defun ruby-ts--ancestor-is (type)
|
||||
"Check that ancestor's type matches regexp TYPE."
|
||||
(lambda (node &rest _)
|
||||
(treesit-parent-until node (ruby-ts--type-pred type))))
|
||||
|
||||
(defun ruby-ts--align-chain-p (&rest _)
|
||||
"Return value of `ruby-align-chained-calls'."
|
||||
ruby-align-chained-calls)
|
||||
|
@ -475,9 +460,6 @@ array or hash."
|
|||
(first-child (ruby-ts--first-non-comment-child parent)))
|
||||
(= (ruby-ts--lineno open-brace) (ruby-ts--lineno first-child))))
|
||||
|
||||
(defalias 'ancestor-node #'ruby-ts--ancestor-is
|
||||
"Return ancestor node whose type matches regexp TYPE.")
|
||||
|
||||
(defun ruby-ts--assignment-ancestor (node &rest _)
|
||||
"Return the assignment ancestor of NODE if any."
|
||||
(treesit-parent-until node (ruby-ts--type-pred "\\`assignment\\'")))
|
||||
|
|
Loading…
Add table
Reference in a new issue