emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/phpinspect a534b7ab12 4/4: Remove unused new-root param


From: ELPA Syncer
Subject: [elpa] externals/phpinspect a534b7ab12 4/4: Remove unused new-root parameter from phpinspect-toc-update
Date: Wed, 18 Sep 2024 18:58:39 -0400 (EDT)

branch: externals/phpinspect
commit a534b7ab122022542bf5dafcda1829841ac0a6da
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>

    Remove unused new-root parameter from phpinspect-toc-update
---
 phpinspect-buffer.el | 14 +++++++-------
 phpinspect-toc.el    |  2 +-
 test/test-toc.el     |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/phpinspect-buffer.el b/phpinspect-buffer.el
index 7e9d5a39e2..6cafc5142b 100644
--- a/phpinspect-buffer.el
+++ b/phpinspect-buffer.el
@@ -210,7 +210,7 @@ linked with."
     (if (phpinspect-buffer-used-traits buffer)
         (pcase-let ((`(,new ,deleted)
                      (phpinspect-toc-update
-                      (phpinspect-buffer-used-traits buffer) uses 
(phpinspect-buffer-root-meta buffer))))
+                      (phpinspect-buffer-used-traits buffer) uses)))
           (unless (or new deleted)
             ;; Nothing changed, don't update
             (setq update nil)))
@@ -242,7 +242,7 @@ linked with."
   (let (to-be-indexed)
     (if (phpinspect-buffer-imports buffer)
         (pcase-let* ((`(,new) (phpinspect-toc-update
-                               (phpinspect-buffer-imports buffer) imports 
(phpinspect-buffer-root-meta buffer))))
+                               (phpinspect-buffer-imports buffer) imports)))
           (setq to-be-indexed new))
       (setq to-be-indexed (phpinspect-splayt-to-list imports))
       (setf (phpinspect-buffer-imports buffer) (phpinspect-make-toc imports)))
@@ -253,12 +253,12 @@ linked with."
 
 (cl-defmethod phpinspect-buffer-index-namespaces ((buffer phpinspect-buffer) 
(namespaces (head phpinspect-splayt)))
   (if (phpinspect-buffer-namespaces buffer)
-      (phpinspect-toc-update (phpinspect-buffer-namespaces buffer) namespaces 
(phpinspect-buffer-root-meta buffer))
+      (phpinspect-toc-update (phpinspect-buffer-namespaces buffer) namespaces)
     (setf (phpinspect-buffer-namespaces buffer) (phpinspect-make-toc 
namespaces))))
 
 (cl-defmethod phpinspect-buffer-index-declarations ((buffer phpinspect-buffer) 
(declarations (head phpinspect-splayt)))
   (if (phpinspect-buffer-declarations buffer)
-      (phpinspect-toc-update (phpinspect-buffer-declarations buffer) 
declarations (phpinspect-buffer-root-meta buffer))
+      (phpinspect-toc-update (phpinspect-buffer-declarations buffer) 
declarations)
     (setf (phpinspect-buffer-declarations buffer) (phpinspect-make-toc 
declarations))))
 
 (defun phpinspect-get-token-index-context (namespaces all-imports meta)
@@ -293,7 +293,7 @@ linked with."
     (if (phpinspect-buffer-classes buffer)
         (pcase-let* ((`(,new-classes ,deleted-classes) (phpinspect-toc-update
                                                         
(phpinspect-buffer-classes buffer)
-                                                        classes 
(phpinspect-buffer-root-meta buffer)))
+                                                        classes))
                      (new-declarations) (declaration) (replaced) (indexed) 
(class))
           ;; Collect declarations of new classes
           (dolist (class new-classes)
@@ -358,7 +358,7 @@ linked with."
         to-be-indexed class-environments class indexed)
     (if (phpinspect-buffer-functions buffer)
         (pcase-let ((`(,new-funcs ,deleted-funcs)
-                     (phpinspect-toc-update (phpinspect-buffer-functions 
buffer) functions (phpinspect-buffer-root-meta buffer))))
+                     (phpinspect-toc-update (phpinspect-buffer-functions 
buffer) functions)))
           (setq to-be-indexed new-funcs)
 
           (dolist (deleted deleted-funcs)
@@ -433,7 +433,7 @@ linked with."
     (if (phpinspect-buffer-class-variables buffer)
         (pcase-let ((`(,new-vars ,deleted-vars)
                      (phpinspect-toc-update
-                      (phpinspect-buffer-class-variables buffer) 
class-variables (phpinspect-buffer-root-meta buffer))))
+                      (phpinspect-buffer-class-variables buffer) 
class-variables)))
           (setq to-be-indexed new-vars)
 
           (dolist (deleted deleted-vars)
diff --git a/phpinspect-toc.el b/phpinspect-toc.el
index f56f0882fa..8c5d978087 100644
--- a/phpinspect-toc.el
+++ b/phpinspect-toc.el
@@ -49,7 +49,7 @@
 (define-inline phpinspect-toc-table (toc)
   (inline-quote (cadr ,toc)))
 
-(defun phpinspect-toc-update (toc new-tree current-root)
+(defun phpinspect-toc-update (toc new-tree)
   (let ((current-tree (phpinspect-toc-tree toc))
         (new-table (make-hash-table :test #'eq :size 20 :rehash-size 2.0))
         new deleted)
diff --git a/test/test-toc.el b/test/test-toc.el
index 5a6def2eba..aeeca7222b 100644
--- a/test/test-toc.el
+++ b/test/test-toc.el
@@ -45,7 +45,7 @@
 
     (phpinspect-meta-delete root)
 
-    (pcase-let ((`(,result-new ,result-deleted) (phpinspect-toc-update toc 
new-tokens new-root)))
+    (pcase-let ((`(,result-new ,result-deleted) (phpinspect-toc-update toc 
new-tokens)))
       (should (= 1 (length result-new)))
       (should (= 1 (length result-deleted)))
 



reply via email to

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