diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-06-19 09:41:04 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-06-19 09:41:04 +0200 |
commit | a943ec0915fdf9a39eecbbd2457fb5d50c6f36c1 (patch) | |
tree | 63c9729c6f6d0eec2543a79ee93b6fa90033545e /helm-imenu.el | |
parent | 0e25ae61401ac139bf62071cd5f0ccb8fcfbd338 (diff) |
Add a progress reporter in imenu all.
* helm-imenu.el (helm-imenu-candidates-in-all-buffers): Do it.
Diffstat (limited to 'helm-imenu.el')
-rw-r--r-- | helm-imenu.el | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/helm-imenu.el b/helm-imenu.el index 38e9b954..e11dc8cc 100644 --- a/helm-imenu.el +++ b/helm-imenu.el @@ -150,15 +150,23 @@ (setq helm-cached-imenu-tick tick)))))) (defun helm-imenu-candidates-in-all-buffers () - (cl-loop for b in (buffer-list) - for mm = (with-current-buffer b major-mode) - for cmm = (with-helm-current-buffer major-mode) - when (or (with-helm-current-buffer - (derived-mode-p mm)) - (with-current-buffer b - (derived-mode-p cmm))) - append (with-current-buffer b - (helm-imenu-candidates b)))) + (let* ((lst (buffer-list)) + (progress-reporter (make-progress-reporter + "Imenu indexing buffers..." 1 (length lst)))) + (prog1 + (cl-loop for b in lst + for count from 1 + for mm = (with-current-buffer b major-mode) + for cmm = (with-helm-current-buffer major-mode) + when (or (with-helm-current-buffer + (derived-mode-p mm)) + (with-current-buffer b + (derived-mode-p cmm))) + do (progress-reporter-update progress-reporter count) + and + append (with-current-buffer b + (helm-imenu-candidates b))) + (progress-reporter-done progress-reporter)))) (defun helm-imenu--candidates-1 (alist) (cl-loop for elm in alist |