emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 d9ed736f0a: ruby-ts-mode: Remove some currently unused function


From: Dmitry Gutov
Subject: emacs-29 d9ed736f0a: ruby-ts-mode: Remove some currently unused functions
Date: Sun, 1 Jan 2023 20:51:29 -0500 (EST)

branch: emacs-29
commit d9ed736f0a724693929c0712b0c443d77a9707f1
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    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.
---
 lisp/progmodes/ruby-ts-mode.el | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index ac016caccd..5c9a25c1fd 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\\'")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]