From: Dmitry Gutov Date: Mon, 2 Jan 2023 01:51:11 +0000 (+0200) Subject: ruby-ts-mode: Remove some currently unused functions X-Git-Tag: emacs-29.0.90~869 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d9ed736f0a7;p=emacs.git 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. --- 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\\'")))