From 6923eb7834fcd59d01181c70a4c3420cab27455a Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 22 Nov 2023 15:28:48 +0200 Subject: yeetube-mpv:(check) Improve error message & use `unless` There is no need for more specific error messages (via pcase). --- yeetube-mpv.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yeetube-mpv.el') diff --git a/yeetube-mpv.el b/yeetube-mpv.el index 24a10a1..a24e544 100644 --- a/yeetube-mpv.el +++ b/yeetube-mpv.el @@ -36,9 +36,9 @@ (defun yeetube-mpv-check () "Check if mpv and yt-dlp is installed." - (pcase (and (executable-find "mpv") - (executable-find "yt-dlp")) - (`nil (error "Unable to play video. Please install `yt-dlp' and `mpv'")))) + (unless (and (executable-find "mpv") + (executable-find "yt-dlp")) + (error "Unable to play video. Please install `yt-dlp' and `mpv'"))) (defun yeetube-mpv-process (command) "Start yeetube process for shell COMMAND." -- cgit v1.2.3