branch: master
commit 819b9362fe141e62b252f1c108690524d7e4539b
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
* helm-async.el: Turn off mode-line notification only when last process end.
---
helm-async.el | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/helm-async.el b/helm-async.el
index cf73dcd..7001b72 100644
--- a/helm-async.el
+++ b/helm-async.el
@@ -95,9 +95,18 @@ This allow to turn off async features provided to this
package."
(sit-for 3)
(force-mode-line-update)))
+(defun helm-async-processes ()
+ "Get all emacs-async processes running."
+ (loop for p in (mapcar 'process-name (process-list))
+ when (string-match "emacs" p)
+ collect p))
+
(defun helm-async-after-file-create ()
"Callback function used for operation handled by `dired-create-file'."
- (helm-async-mode -1)
+ (unless (helm-async-processes)
+ ;; Turn off mode-line notification
+ ;; only when last process end.
+ (helm-async-mode -1))
(when helm-async-operation
(if (file-exists-p helm-async-log-file)
(progn