From: Eshel Yaron Date: Sun, 22 Jan 2023 19:05:01 +0000 (+0200) Subject: * (sweeprolog-xref-project-source-files): add progress reporting X-Git-Tag: V9.1.3-sweep-0.14.0~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=233e58c82ed8a3f7d6a6edabc40a4117e53ceafd;p=dict.git * (sweeprolog-xref-project-source-files): add progress reporting --- 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."