From 233e58c82ed8a3f7d6a6edabc40a4117e53ceafd Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 22 Jan 2023 21:05:01 +0200 Subject: [PATCH] * (sweeprolog-xref-project-source-files): add progress reporting --- sweeprolog.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sweeprolog.el b/sweeprolog.el index 38fe0e0..3876bfd 100644 --- a/sweeprolog.el +++ b/sweeprolog.el @@ -829,12 +829,17 @@ PROJECT (only on Emacs 28 or later)." (project-current))) (or (project-current) (user-error "No current project"))))) - (when-let ((proj (or project (project-current)))) - (mapc (lambda (path) - (sweeprolog--query-once "sweep" "sweep_xref_source" path)) - (seq-filter (lambda (path) - (string= "pl" (file-name-extension path))) - (project-files proj))))) + (when-let ((proj (or project (project-current))) + (files (seq-filter + (lambda (path) + (string= "pl" (file-name-extension path))) + (project-files proj)))) + (dolist-with-progress-reporter + (file (seq-filter (lambda (file) + (string= "pl" (file-name-extension file))) + (project-files proj))) + "Analyzing Prolog files in project... " + (sweeprolog--query-once "sweep" "sweep_xref_source" file)))) (defun sweeprolog-predicate-references (mfn) "Find source locations where the predicate MFN is called." -- 2.39.2