branch: externals/tmr
commit 4c924b99884f95e82a97e8373525ea6cf327f302
Author: Nathan R. DeGruchy <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
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