branch: externals/async
commit 953a614ea769c62b9d2492b233dd7298adc63137
Author: Allen Li <darkfel...@felesatra.moe>
Commit: Allen Li <darkfel...@felesatra.moe>

    Add mode line lighter for dired-async-mode
---
 dired-async.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/dired-async.el b/dired-async.el
index a97a9a3..b592cac 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -66,6 +66,14 @@ Should take same args as `message'."
   :group 'dired-async
   :type 'string)
 
+(defcustom dired-async-mode-lighter '(:eval
+                                      (when (eq major-mode 'dired-mode)
+                                        " Async"))
+  "Mode line lighter used for `dired-async-mode'."
+  :group 'dired-async
+  :risky t
+  :type 'sexp)
+
 (defface dired-async-message
     '((t (:foreground "yellow")))
   "Face used for mode-line message."
@@ -337,8 +345,9 @@ ESC or `q' to not overwrite any of the remaining files,
 
 ;;;###autoload
 (define-minor-mode dired-async-mode
-    "Do dired actions asynchronously."
+  "Do dired actions asynchronously."
   :group 'dired-async
+  :lighter dired-async-mode-lighter
   :global t
   (if dired-async-mode
       (if (fboundp 'advice-add)

Reply via email to