branch: externals/tmr
commit b528500eda1bf3753f90d81f34792cfc7847bd7d
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make stylistic change to tmr-sound-play to print a warning if ffplay is 
missing
---
 tmr.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tmr.el b/tmr.el
index 778f1e8c13..0744976878 100644
--- a/tmr.el
+++ b/tmr.el
@@ -551,10 +551,11 @@ Read Info node `(elisp) Desktop Notifications' for 
details."
 (defun tmr-sound-play (&optional _timer)
   "Play `tmr-sound-file' using the ffplay executable (ffmpeg).
 TIMER is unused."
-  (when-let* ((_ (executable-find "ffplay"))
-              (sound (expand-file-name tmr-sound-file))
-              ((file-exists-p sound)))
-    (call-process "ffplay" nil 0 nil "-nodisp" "-autoexit" sound)))
+  (if (executable-find "ffplay")
+      (when-let* ((sound (expand-file-name tmr-sound-file))
+                  (_ (file-exists-p sound)))
+        (call-process "ffplay" nil 0 nil "-nodisp" "-autoexit" sound))
+    (display-warning 'tmr "`ffplay' is not available to play back 
`tmr-sound-file'")))
 
 (defun tmr-print-message-for-created-timer (timer)
   "Show a `message' informing the user that TIMER was created."

Reply via email to