diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2023-01-02 03:51:11 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2023-01-02 03:51:11 +0200 |
commit | d9ed736f0a724693929c0712b0c443d77a9707f1 (patch) | |
tree | 1d4a7631e40741b8b1a8ac7ccbfc25ecbc446dc1 | |
parent | 45618447203a1332125106bf2d7a61f2c53e3939 (diff) | |
download | emacs-d9ed736f0a724693929c0712b0c443d77a9707f1.tar.gz |
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.
-rw-r--r-- | lisp/progmodes/ruby-ts-mode.el | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index ac016caccdc..5c9a25c1fde 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -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\\'"))) |