]> code.delx.au - gnu-emacs-elpa/commitdiff
* helm-async.el: Fix mode-line updating for emacs-24.3.50.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Tue, 11 Jun 2013 15:44:12 +0000 (17:44 +0200)
committerThierry Volpiatto <thierry.volpiatto@gmail.com>
Tue, 11 Jun 2013 15:44:12 +0000 (17:44 +0200)
(helm-async-mode): Propertize lighter.
(helm-async-after-file-create): Delay execution of mode-line notification.
(helm-async-message): add group.
(helm-async-mode-message): new face.

helm-async.el

index bdc4e5d3a349f978bd56c15183523e96c8983cd3..ca50e416e2173b6921ee6a777b0f28440c62aab1 100644 (file)
@@ -74,13 +74,20 @@ This allow to turn off async features provided to this package."
 
 (defface helm-async-message
     '((t (:foreground "yellow")))
-  "Face used for mode-line message.")
+  "Face used for mode-line message."
+  :group 'helm-async)
+
+(defface helm-async-mode-message
+    '((t (:background "Firebrick1")))
+  "Face used for `helm-async-mode' lighter."
+  :group 'helm-async)
 
 (define-minor-mode helm-async-mode
     "Notify mode-line that an async process run."
   :group 'helm-async
   :global t
-  :lighter " [Async job running]"
+  :lighter (:eval (propertize " [Async job running]"
+                              'face 'helm-async-mode-message))
   (unless helm-async-mode
     (let ((visible-bell t)) (ding))))
 
@@ -125,8 +132,10 @@ This allow to turn off async features provided to this package."
           (insert "Error: ")
           (insert-file-contents helm-async-log-file)
           (delete-file helm-async-log-file))
-        (funcall helm-async-message-function "Asynchronous %s of %s file(s) done"
-                 (car helm-async-operation) (cadr helm-async-operation)))))
+        (run-with-timer
+         0.1 nil
+         helm-async-message-function "Asynchronous %s of %s file(s) done"
+         (car helm-async-operation) (cadr helm-async-operation)))))
 
 (defun helm-async-maybe-kill-ftp ()
   "Return a form to kill ftp process in child emacs."