aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-18 12:19:37 +0200
committerLars Ingebrigtsen2019-06-18 12:19:37 +0200
commitdc9b7b0068d4da76b9979bc6effc3b6e28f45325 (patch)
treee3b8b19c9ac0d304c82c6d0ce3326e336a76ea59
parent5da1230f6182c772f56b10ae5026780ac252d8dc (diff)
downloademacs-dc9b7b0068d4da76b9979bc6effc3b6e28f45325.tar.gz
emacs-dc9b7b0068d4da76b9979bc6effc3b6e28f45325.zip
Output progress reports when scanning for finder/custom
* 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.
-rw-r--r--lisp/cus-dep.el12
-rw-r--r--lisp/finder.el6
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index e26837b1aac..161c5bbec69 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -55,12 +55,12 @@ ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
55Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" 55Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
56 (let ((enable-local-eval nil) 56 (let ((enable-local-eval nil)
57 (enable-local-variables :safe) 57 (enable-local-variables :safe)
58 (file-count 0)
58 subdir) 59 subdir)
59 (with-temp-buffer 60 (with-temp-buffer
60 ;; Use up command-line-args-left else Emacs can try to open 61 ;; Use up command-line-args-left else Emacs can try to open
61 ;; the args as directories after we are done. 62 ;; the args as directories after we are done.
62 (while (setq subdir (pop command-line-args-left)) 63 (while (setq subdir (pop command-line-args-left))
63 (message "Scanning %s for custom" subdir)
64 (let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'")) 64 (let ((files (directory-files subdir nil "\\`[^=.].*\\.el\\'"))
65 (default-directory 65 (default-directory
66 (file-name-as-directory (expand-file-name subdir))) 66 (file-name-as-directory (expand-file-name subdir)))
@@ -68,6 +68,10 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
68 (regexp-opt preloaded-file-list t) 68 (regexp-opt preloaded-file-list t)
69 "\\.el\\'"))) 69 "\\.el\\'")))
70 (dolist (file files) 70 (dolist (file files)
71 (setq file-count (1+ file-count))
72 (when (zerop (mod file-count 100))
73 (byte-compile-info-message "Scanned %s files for custom"
74 file-count))
71 (unless (or (string-match custom-dependencies-no-scan-regexp file) 75 (unless (or (string-match custom-dependencies-no-scan-regexp file)
72 (string-match preloaded (format "%s/%s" subdir file)) 76 (string-match preloaded (format "%s/%s" subdir file))
73 (not (file-exists-p file))) 77 (not (file-exists-p file)))
@@ -115,7 +119,8 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
115 "variable" 119 "variable"
116 type))))))))))) 120 type)))))))))))
117 (error nil))))))))) 121 (error nil)))))))))
118 (message "Generating %s..." generated-custom-dependencies-file) 122 (byte-compile-info-message "Generating %s..."
123 generated-custom-dependencies-file)
119 (set-buffer (find-file-noselect generated-custom-dependencies-file)) 124 (set-buffer (find-file-noselect generated-custom-dependencies-file))
120 (setq buffer-undo-list t) 125 (setq buffer-undo-list t)
121 (erase-buffer) 126 (erase-buffer)
@@ -204,7 +209,8 @@ elements the files that have variables or faces that contain that
204version. These files should be loaded before showing the customization 209version. These files should be loaded before showing the customization
205buffer that `customize-changed-options' generates.\")\n\n")) 210buffer that `customize-changed-options' generates.\")\n\n"))
206 (save-buffer) 211 (save-buffer)
207 (message "Generating %s...done" generated-custom-dependencies-file)) 212 (byte-compile-info-message "Generating %s...done"
213 generated-custom-dependencies-file))
208 214
209 215
210(provide 'cus-dep) 216(provide 'cus-dep)
diff --git a/lisp/finder.el b/lisp/finder.el
index 54a0758949a..26ff5a18f1d 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -189,11 +189,11 @@ from; the default is `load-path'."
189 (setq package--builtins nil) 189 (setq package--builtins nil)
190 (setq finder-keywords-hash (make-hash-table :test 'eq)) 190 (setq finder-keywords-hash (make-hash-table :test 'eq))
191 (let ((el-file-regexp "^\\([^=].*\\)\\.el\\(\\.\\(gz\\|Z\\)\\)?$") 191 (let ((el-file-regexp "^\\([^=].*\\)\\.el\\(\\.\\(gz\\|Z\\)\\)?$")
192 (file-count 0)
192 package-override files base-name ; processed 193 package-override files base-name ; processed
193 summary keywords package version entry desc) 194 summary keywords package version entry desc)
194 (dolist (d (or dirs load-path)) 195 (dolist (d (or dirs load-path))
195 (when (file-exists-p (directory-file-name d)) 196 (when (file-exists-p (directory-file-name d))
196 (message "Scanning %s for finder" d)
197 (setq package-override 197 (setq package-override
198 (intern-soft 198 (intern-soft
199 (cdr-safe 199 (cdr-safe
@@ -201,6 +201,10 @@ from; the default is `load-path'."
201 finder--builtins-alist)))) 201 finder--builtins-alist))))
202 (setq files (directory-files d nil el-file-regexp)) 202 (setq files (directory-files d nil el-file-regexp))
203 (dolist (f files) 203 (dolist (f files)
204 (setq file-count (1+ file-count))
205 (when (zerop (mod file-count 100))
206 (byte-compile-info-message "Scanned %s files for finder"
207 file-count))
204 (unless (or (string-match finder-no-scan-regexp f) 208 (unless (or (string-match finder-no-scan-regexp f)
205 (null (setq base-name 209 (null (setq base-name
206 (and (string-match el-file-regexp f) 210 (and (string-match el-file-regexp f)