diff options
Diffstat (limited to 'lib/media')
-rw-r--r-- | lib/media/jao-mpc.el | 6 | ||||
-rw-r--r-- | lib/media/jao-mpris.el | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el index ab8823f..4f5081c 100644 --- a/lib/media/jao-mpc.el +++ b/lib/media/jao-mpc.el @@ -125,7 +125,7 @@ (defvar jao-mpc--idle-procs nil) (defun jao-mpc--idle-loop (&optional port) - (when-let* ((proc (alist-get port jao-mpc--idle-procs))) + (when-let (proc (alist-get port jao-mpc--idle-procs)) (ignore-errors (kill-process proc))) (setf (alist-get port jao-mpc--idle-procs nil t) (make-process :name (format "jao-mpc-idleloop (%s)" port) @@ -146,7 +146,7 @@ (read-only-mode 1)) (defun jao-mpc--album-buffer () - (if-let* ((b (get-buffer jao-mpc--albums))) + (if-let (b (get-buffer jao-mpc--albums)) b (with-current-buffer (get-buffer-create jao-mpc--albums) (jao-mpc-albums-mode) @@ -331,7 +331,7 @@ (jao-mpc--cmd jao-mpc--simple-albums-cmd port) albums-str)) (albums (split-string albums-str "\n" t))) - (when-let* ((album (completing-read "Play album: " albums nil t))) + (when-let (album (completing-read "Play album: " albums nil t)) (jao-mpc--add-and-play (car (split-string album "-" t " ")) port)))) (provide 'jao-mpc) diff --git a/lib/media/jao-mpris.el b/lib/media/jao-mpris.el index f2974ab..3bb2636 100644 --- a/lib/media/jao-mpris.el +++ b/lib/media/jao-mpris.el @@ -97,7 +97,7 @@ jao-mpris--current nil)) (defun jao-mpris--get (k &optional l) - (when-let* ((v (alist-get k (or l jao-mpris--current)))) + (when-let (v (alist-get k (or l jao-mpris--current))) (if (consp v) (car v) v))) (defun jao-mpris--set-current (k v) @@ -146,7 +146,7 @@ (interactive "P") (when refresh (jao-mpris--track)) (when jao-mpris--current - (jao-notify (format "%s%s" (if-let* ((s (jao-mpris--get 'status))) + (jao-notify (format "%s%s" (if-let (s (jao-mpris--get 'status)) (format "%s: " s) "") (jao-mpris--format))))) @@ -159,7 +159,7 @@ (defun jao-mpris--handler (iname properties &rest _args) (let ((inhibit-message t)) (message "Received properties: %S from %s" properties iname)) - (when-let* ((md (caadr (assoc "Metadata" properties)))) + (when-let (md (caadr (assoc "Metadata" properties))) (let ((tno (caadr (assoc "xesam:trackNumber" md))) (tlt (caadr (assoc "xesam:title" md))) (art (caadr (assoc "xesam:artist" md))) @@ -172,8 +172,7 @@ (jao-mpris--set-current 'artist art) (jao-mpris--set-current 'album alb) (jao-mpris--set-current 'length len)))) - (when-let* ((st (or (caadr (assoc "PlaybackStatus" properties)) - (jao-mpris--get 'status)))) + (when-let (st (caadr (assoc "PlaybackStatus" properties))) (jao-mpris--set-current 'status st) (when (string= st "Stopped") (dolist (k '(track title artist album length)) |