]> git.eshelyaron.com Git - emacs.git/commitdiff
Output progress reports when scanning for finder/custom
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2019 10:19:37 +0000 (12:19 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2019 10:19:37 +0000 (12:19 +0200)
* lisp/cus-dep.el (custom-make-dependencies): Ditto.

* lisp/finder.el (finder-compile-keywords): Instead of outputting
the directories being scanned, output progress reports on the
number of files being scanned.  This makes the output more similar
to the autoload scraping.

lisp/cus-dep.el
lisp/finder.el

index e26837b1aacc1ad2a929ad23e7be5cd30ead9af3..161c5bbec693385888c0fa919db812d2d267c429 100644 (file)
@@ -55,12 +55,12 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
 Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
   (let ((enable-local-eval nil)
        (enable-local-variables :safe)
+        (file-count 0)
        subdir)
     (with-temp-buffer
       ;; Use up command-line-args-left else Emacs can try to open
       ;; the args as directories after we are done.
       (while (setq subdir (pop command-line-args-left))
-        (message "Scanning %s for custom" subdir)
         (let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'"))
               (default-directory
                 (file-name-as-directory (expand-file-name subdir)))
@@ -68,6 +68,10 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                                  (regexp-opt preloaded-file-list t)
                                  "\\.el\\'")))
           (dolist (file files)
+            (setq file-count (1+ file-count))
+            (when (zerop (mod file-count 100))
+              (byte-compile-info-message "Scanned %s files for custom"
+                                         file-count))
             (unless (or (string-match custom-dependencies-no-scan-regexp file)
                         (string-match preloaded (format "%s/%s" subdir file))
                         (not (file-exists-p file)))
@@ -115,7 +119,8 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                                                          "variable"
                                                        type)))))))))))
                   (error nil)))))))))
-  (message "Generating %s..." generated-custom-dependencies-file)
+  (byte-compile-info-message "Generating %s..."
+                             generated-custom-dependencies-file)
   (set-buffer (find-file-noselect generated-custom-dependencies-file))
   (setq buffer-undo-list t)
   (erase-buffer)
@@ -204,7 +209,8 @@ elements the files that have variables or faces that contain that
 version.  These files should be loaded before showing the customization
 buffer that `customize-changed-options' generates.\")\n\n"))
   (save-buffer)
-  (message "Generating %s...done" generated-custom-dependencies-file))
+  (byte-compile-info-message "Generating %s...done"
+                             generated-custom-dependencies-file))
 
 \f
 (provide 'cus-dep)
index 54a0758949aaf51f6265aec6bfd9aaabb8e6a310..26ff5a18f1ddb7843cb1305db72268e2a273a2f2 100644 (file)
@@ -189,11 +189,11 @@ from; the default is `load-path'."
   (setq package--builtins nil)
   (setq finder-keywords-hash (make-hash-table :test 'eq))
   (let ((el-file-regexp "^\\([^=].*\\)\\.el\\(\\.\\(gz\\|Z\\)\\)?$")
+        (file-count 0)
        package-override files base-name ; processed
        summary keywords package version entry desc)
     (dolist (d (or dirs load-path))
       (when (file-exists-p (directory-file-name d))
-       (message "Scanning %s for finder" d)
        (setq package-override
              (intern-soft
               (cdr-safe
@@ -201,6 +201,10 @@ from; the default is `load-path'."
                       finder--builtins-alist))))
        (setq files (directory-files d nil el-file-regexp))
        (dolist (f files)
+          (setq file-count (1+ file-count))
+          (when (zerop (mod file-count 100))
+            (byte-compile-info-message "Scanned %s files for finder"
+                                       file-count))
          (unless (or (string-match finder-no-scan-regexp f)
                      (null (setq base-name
                                  (and (string-match el-file-regexp f)