emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/emms d8dec2c517 1/2: * emms-info.el: add `emms-info-ini


From: ELPA Syncer
Subject: [elpa] externals/emms d8dec2c517 1/2: * emms-info.el: add `emms-info-init-done-hook'
Date: Mon, 1 Jul 2024 18:58:00 -0400 (EDT)

branch: externals/emms
commit d8dec2c517b94c21c378229faadb07843153ef02
Author: Yoni Rabkin <yrk@gnu.org>
Commit: Yoni Rabkin <yrk@gnu.org>

    * emms-info.el: add `emms-info-init-done-hook'
    
    Called after asynchronously initializing all tracks.
---
 emms-info.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/emms-info.el b/emms-info.el
index f6328692af..77273fe231 100644
--- a/emms-info.el
+++ b/emms-info.el
@@ -71,6 +71,10 @@ This variable is only used when adding tracks 
asynchronously."
 Each is called with a track as argument."
   :type 'hook)
 
+(defcustom emms-info-init-done-hook nil
+  "Called after asynchronously initializing all tracks."
+  :type 'hook)
+
 (defvar emms-info-asynchronous-tracks 0
   "Number of tracks we're waiting for to be done.")
 
@@ -106,7 +110,9 @@ Return t when the track got changed."
     (when emms-info-asynchronously
       (setq emms-info-asynchronous-tracks (1- emms-info-asynchronous-tracks))
       (if (zerop emms-info-asynchronous-tracks)
-          (message "EMMS: All track information loaded.")
+         (progn
+           (run-hook-with-args 'emms-info-init-done-hook)
+            (message "EMMS: All track information loaded."))
         (unless (zerop emms-info-report-each-num-tracks)
           (if (zerop
                (mod emms-info-asynchronous-tracks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]