X-Git-Url: http://christophe.rhodes.io/gitweb/?p=squeeze-el.git;a=blobdiff_plain;f=squeeze.el;h=95bfdf140f358be70e5d1de1e16a4e825629fb68;hp=0b637ad4ed09458b4731719439825dbb7e332982;hb=ac46829f42f950bc74751e458646c708b3616d6c;hpb=a7f98c81e7e69313ec8bf7c029aa9728913bc9a4 diff --git a/squeeze.el b/squeeze.el index 0b637ad..95bfdf1 100644 --- a/squeeze.el +++ b/squeeze.el @@ -169,27 +169,31 @@ (interactive) (unless id (setq id (get-text-property (point) 'squeeze-playerid))) - (comint-send-string (get-buffer-process "*squeeze*") (format "%s power ?\n" id))) + (when id + (comint-send-string (get-buffer-process "*squeeze*") (format "%s power ?\n" id)))) (defun squeeze-control-volume-up (&optional id inc) (interactive) (unless inc (setq inc 5)) (unless id (setq id (get-text-property (point) 'squeeze-playerid))) - (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume %+d\n" id inc))) + (when id + (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume %+d\n" id inc)))) (defun squeeze-control-volume-down (&optional id inc) (interactive) (unless inc (setq inc 5)) (unless id (setq id (get-text-property (point) 'squeeze-playerid))) - (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume %+d\n" id (- inc)))) + (when id + (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume %+d\n" id (- inc))))) (defun squeeze-control-query-mixer-volume (&optional id) (interactive) (unless id (setq id (get-text-property (point) 'squeeze-playerid))) - (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume ?\n" id))) + (when id + (comint-send-string (get-buffer-process "*squeeze*") (format "%s mixer volume ?\n" id)))) (defun squeeze-control-player-face (player) (let ((power (squeeze-player-power player)))