diff options
| author | Lars Ingebrigtsen | 2019-06-18 16:13:54 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-19 13:48:48 +0200 |
| commit | eef48e124da251605ea05579aac196f2f8e2f534 (patch) | |
| tree | a9e8e54e72c9d6c380806e9ef9d332773d17290a | |
| parent | d3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a (diff) | |
| download | emacs-eef48e124da251605ea05579aac196f2f8e2f534.tar.gz emacs-eef48e124da251605ea05579aac196f2f8e2f534.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 14 |
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." | |||
| 1061 | ;; Files with no autoload cookies or whose autoloads go to other | 1061 | ;; Files with no autoload cookies or whose autoloads go to other |
| 1062 | ;; files because of file-local autoload-generated-file settings. | 1062 | ;; files because of file-local autoload-generated-file settings. |
| 1063 | (no-autoloads nil) | 1063 | (no-autoloads nil) |
| 1064 | (file-count 0) | ||
| 1065 | (autoload-modified-buffers nil) | 1064 | (autoload-modified-buffers nil) |
| 1066 | (generated-autoload-file | 1065 | (generated-autoload-file |
| 1067 | (if (called-interactively-p 'interactive) | 1066 | (if (called-interactively-p 'interactive) |
| @@ -1125,12 +1124,14 @@ write its autoloads into the specified file instead." | |||
| 1125 | (push file done) | 1124 | (push file done) |
| 1126 | (setq files (delete file files))))) | 1125 | (setq files (delete file files))))) |
| 1127 | ;; Elements remaining in FILES have no existing autoload sections yet. | 1126 | ;; Elements remaining in FILES have no existing autoload sections yet. |
| 1128 | (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time) | 1127 | (let ((no-autoloads-time (or last-time '(0 0 0 0))) |
| 1128 | (progress (make-progress-reporter | ||
| 1129 | (byte-compile-info-string "Scraping files for autoloads") | ||
| 1130 | 0 (length files) nil 10)) | ||
| 1131 | (file-count 0) | ||
| 1132 | file-time) | ||
| 1129 | (dolist (file files) | 1133 | (dolist (file files) |
| 1130 | (setq file-count (1+ file-count)) | 1134 | (progress-reporter-update progress (setq file-count (1+ file-count))) |
| 1131 | (when (zerop (mod file-count 100)) | ||
| 1132 | (byte-compile-info-message "Scraped autoloads from %d files" | ||
| 1133 | file-count)) | ||
| 1134 | (cond | 1135 | (cond |
| 1135 | ;; Passing nil as second argument forces | 1136 | ;; Passing nil as second argument forces |
| 1136 | ;; autoload-generate-file-autoloads to look for the right | 1137 | ;; autoload-generate-file-autoloads to look for the right |
| @@ -1141,6 +1142,7 @@ write its autoloads into the specified file instead." | |||
| 1141 | (if (time-less-p no-autoloads-time file-time) | 1142 | (if (time-less-p no-autoloads-time file-time) |
| 1142 | (setq no-autoloads-time file-time))) | 1143 | (setq no-autoloads-time file-time))) |
| 1143 | (t (setq changed t)))) | 1144 | (t (setq changed t)))) |
| 1145 | (progress-reporter-done progress) | ||
| 1144 | 1146 | ||
| 1145 | (when no-autoloads | 1147 | (when no-autoloads |
| 1146 | ;; Sort them for better readability. | 1148 | ;; Sort them for better readability. |