aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-03-20 06:51:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-03-20 06:51:00 +0000
commitd580c73fbef1c4cc21cd1638b4581021df32a3c3 (patch)
treeb6356d2208ca1638d748ba8b794428215dd61cc6
parenta40c9d74e6b973ace486493bd521dec78d253b9e (diff)
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
-rw-r--r--emms-player-mpd.el10
1 files 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 ()