]> git.eshelyaron.com Git - dict.git/commitdiff
* (sweeprolog-xref-project-source-files): add progress reporting
authorEshel Yaron <me@eshelyaron.com>
Sun, 22 Jan 2023 19:05:01 +0000 (21:05 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 22 Jan 2023 19:05:01 +0000 (21:05 +0200)
sweeprolog.el

index 38fe0e024cc38f337f1e9f5abeea7787f2bf01bb..3876bfd3b75c8985a75f78da9eeeedfbbe939abe 100644 (file)
@@ -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."