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

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

[elpa] externals/tmr 4c924b9988 1/2: Fix 'when-let*' form in tmr-sound-p


From: ELPA Syncer
Subject: [elpa] externals/tmr 4c924b9988 1/2: Fix 'when-let*' form in tmr-sound-play
Date: Thu, 9 Jun 2022 09:58:22 -0400 (EDT)

branch: externals/tmr
commit 4c924b99884f95e82a97e8373525ea6cf327f302
Author: Nathan R. DeGruchy <nathan@degruchy.org>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Fix 'when-let*' form in tmr-sound-play
    
    It would return an error on Emacs 27.1, namely:
    
        Error running timer ‘tmr--complete’: (invalid-function (sound 
tmr-sound-file))
---
 tmr-sound.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tmr-sound.el b/tmr-sound.el
index 540b833d58..c3aaaf032b 100644
--- a/tmr-sound.el
+++ b/tmr-sound.el
@@ -56,12 +56,12 @@ If nil, don't play any sound."
 (defun tmr-sound-play (&optional _timer)
   "Play `tmr-sound-file' using the 'ffplay' executable (ffmpeg).
 TIMER is unused."
-  (when-let* ((sound tmr-sound-file))
-    (when (file-exists-p sound)
-      (unless (executable-find "ffplay")
-        (user-error "Cannot play %s without `ffplay'" sound))
-      (call-process-shell-command
-       (format "ffplay -nodisp -autoexit %s >/dev/null 2>&1" sound) nil 0))))
+  (when-let ((sound tmr-sound-file)
+             ((file-exists-p sound)))
+    (unless (executable-find "ffplay")
+      (user-error "Cannot play %s without `ffplay'" sound))
+    (call-process-shell-command
+     (format "ffplay -nodisp -autoexit %s >/dev/null 2>&1" sound) nil 0)))
 
 (provide 'tmr-sound)
 ;;; tmr-sound.el ends here



reply via email to

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