aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-01-01 02:09:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-01-01 02:09:00 +0000
commit2a0db7acb0c740a9cfa673ab096c316b9ac9e3d5 (patch)
tree8bcdf307dcc31879176b50d7d78598a1bfbeb2a5
parent400cae8b98eb32273a9f6a248309e583056fd1bd (diff)
emms-player-mpd: Make sure the process gets closed autommatically when exiting Emacs.
darcs-hash:20060101020942-1bfb2-315f558879b5e1989e8c82476b0342edf9142f8c.gz
-rw-r--r--emms-player-mpd.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el
index 5c079ff..f92c065 100644
--- a/emms-player-mpd.el
+++ b/emms-player-mpd.el
@@ -196,7 +196,10 @@ and errors."
(set-process-sentinel emms-player-mpd-process
'emms-player-mpd-sentinel)
(set-process-filter emms-player-mpd-process
- 'emms-player-mpd-filter)))
+ 'emms-player-mpd-filter)
+ (if (fboundp 'set-process-query-on-exit-flag)
+ (set-process-query-on-exit-flag emms-player-mpd-process nil)
+ (process-kill-without-query emms-player-mpd-process))))
(defun emms-player-mpd-send (command)
"Send the given COMMAND to the MusicPD server."