[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phpinspect 5eae689f09 2/2: Add separate interactive fun
From: |
ELPA Syncer |
Subject: |
[elpa] externals/phpinspect 5eae689f09 2/2: Add separate interactive function to refresh project autoloader |
Date: |
Thu, 17 Aug 2023 09:58:39 -0400 (EDT) |
branch: externals/phpinspect
commit 5eae689f09e87f6ea6e8262c14732a28dfdc936e
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>
Add separate interactive function to refresh project autoloader
---
phpinspect.el | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/phpinspect.el b/phpinspect.el
index 411b892cc3..8cb19b4904 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -344,13 +344,11 @@ before the search is executed."
(phpinspect-current-project-root))))
(phpinspect-project-get-type-filepath project class index-new)))
-(defun phpinspect-index-current-project ()
- "Index all available FQNs in the current project."
- (interactive)
- (let* ((project (phpinspect--cache-get-project-create
- (phpinspect--get-or-create-global-cache)
- (phpinspect-current-project-root)))
- (autoloader (phpinspect-project-autoload project)))
+(defun phpinspect-project-refresh-autoloader (project)
+ (interactive (list (phpinspect--cache-get-project-create
+ (phpinspect--get-or-create-global-cache)
+ (phpinspect-current-project-root))))
+ (let* ((autoloader (phpinspect-project-autoload project)))
;; Update display so that it is clear to the user that emacs is
;; responsive. Otherwise the autoloader refresh thread hogging the cpu will
;; make it look like emacs is not responsive, especially when M-x uses some
@@ -358,9 +356,16 @@ before the search is executed."
;; appear frozen while the thread is executing.
(redisplay)
- (phpinspect-autoloader-refresh autoloader)
- (phpinspect-project-enqueue-include-dirs project)))
+ (phpinspect-autoloader-refresh autoloader)))
+(defun phpinspect-index-current-project ()
+ "Index all available FQNs in the current project."
+ (interactive)
+ (let* ((project (phpinspect--cache-get-project-create
+ (phpinspect--get-or-create-global-cache)
+ (phpinspect-current-project-root))))
+ (phpinspect-project-refresh-autoloader project)
+ (phpinspect-project-enqueue-include-dirs project)))
(provide 'phpinspect)
;;; phpinspect.el ends here