summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/autoload.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-18 16:13:54 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-19 13:48:48 +0200
commiteef48e124da251605ea05579aac196f2f8e2f534 (patch)
treea9e8e54e72c9d6c380806e9ef9d332773d17290a /lisp/emacs-lisp/autoload.el
parentd3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a (diff)
downloademacs-eef48e124da251605ea05579aac196f2f8e2f534.tar.gz
Tweak progress reporting in update-directory-autoloads
* lisp/emacs-lisp/autoload.el (update-directory-autoloads): Use progress reporter so say what percentage the progress is at.
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r--lisp/emacs-lisp/autoload.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 4661f89523b..21b8caccf4b 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1061,7 +1061,6 @@ write its autoloads into the specified file instead."
;; Files with no autoload cookies or whose autoloads go to other
;; files because of file-local autoload-generated-file settings.
(no-autoloads nil)
- (file-count 0)
(autoload-modified-buffers nil)
(generated-autoload-file
(if (called-interactively-p 'interactive)
@@ -1125,12 +1124,14 @@ write its autoloads into the specified file instead."
(push file done)
(setq files (delete file files)))))
;; Elements remaining in FILES have no existing autoload sections yet.
- (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time)
+ (let ((no-autoloads-time (or last-time '(0 0 0 0)))
+ (progress (make-progress-reporter
+ (byte-compile-info-string "Scraping files for autoloads")
+ 0 (length files) nil 10))
+ (file-count 0)
+ file-time)
(dolist (file files)
- (setq file-count (1+ file-count))
- (when (zerop (mod file-count 100))
- (byte-compile-info-message "Scraped autoloads from %d files"
- file-count))
+ (progress-reporter-update progress (setq file-count (1+ file-count)))
(cond
;; Passing nil as second argument forces
;; autoload-generate-file-autoloads to look for the right
@@ -1141,6 +1142,7 @@ write its autoloads into the specified file instead."
(if (time-less-p no-autoloads-time file-time)
(setq no-autoloads-time file-time)))
(t (setq changed t))))
+ (progress-reporter-done progress)
(when no-autoloads
;; Sort them for better readability.