From d580c73fbef1c4cc21cd1638b4581021df32a3c3 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 20 Mar 2006 06:51:00 +0000 Subject: emms-player-mpd: Try to get values for name and port from environment. Fix awkwardness in `emms-player-mpd-block'. darcs-hash:20060320065153-1bfb2-0f6c4fa2e86903e84a5ea2adebc249eda01f7b2a.gz --- emms-player-mpd.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/emms-player-mpd.el b/emms-player-mpd.el index a16368d..684cace 100644 --- a/emms-player-mpd.el +++ b/emms-player-mpd.el @@ -141,12 +141,12 @@ This will usually be auto-detected correctly." :type 'function :group 'emms-player-mpd) -(defcustom emms-player-mpd-server-name "localhost" +(defcustom emms-player-mpd-server-name (or (getenv "MPD_HOST") "localhost") "The MusicPD server that we should connect to." :type 'string :group 'emms-player-mpd) -(defcustom emms-player-mpd-server-port "6600" +(defcustom emms-player-mpd-server-port (or (getenv "MPD_PORT") "6600") "The port of the MusicPD server that we should connect to." :type '(choice number string) :group 'emms-player-mpd) @@ -251,9 +251,9 @@ If your EMMS playlist contains stored playlists, set this to nil." (defun emms-player-mpd-block () "Block input for MusicPD, waiting if currently blocked. The maximum amount is determined by `emms-player-mpd-timeout'." - `(with-timeout '(,emms-player-mpd-timeout) - (while emms-player-mpd-blocked - (sit-for 0.20))) + (with-timeout (emms-player-mpd-timeout) + (while emms-player-mpd-blocked + (sit-for 0.20))) (setq emms-player-mpd-blocked t)) (defun emms-player-mpd-unblock () -- cgit v1.2.3