aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Xu <william.xwl@gmail.com>2007-11-04 13:27:00 +0000
committerWilliam Xu <william.xwl@gmail.com>2007-11-04 13:27:00 +0000
commitdb6bfe9848971a857518c817acc0773d6f76738d (patch)
tree92f1b128494a1fec3aea3452f46a70f4837720a1
parenteda10285e1fc6aeb287602d1b03590057a0d3bff (diff)
Only add emms-info-* to emms-info-functions when required program actually exists.
darcs-hash:20071104132746-cfa61-85ca6765c3bb76e48a9753435475a4d9a9e555cd.gz
-rw-r--r--emms-setup.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/emms-setup.el b/emms-setup.el
index a39209d..877a768 100644
--- a/emms-setup.el
+++ b/emms-setup.el
@@ -82,8 +82,10 @@ audio files, and a metadata cache."
;; setup
(setq emms-playlist-default-major-mode 'emms-playlist-mode)
(add-to-list 'emms-track-initialize-functions 'emms-info-initialize-track)
- (add-to-list 'emms-info-functions 'emms-info-mp3info)
- (add-to-list 'emms-info-functions 'emms-info-ogginfo)
+ (when (executable-find emms-info-mp3info-program-name)
+ (add-to-list 'emms-info-functions 'emms-info-mp3info))
+ (when (executable-find emms-info-ogginfo-program-name)
+ (add-to-list 'emms-info-functions 'emms-info-ogginfo))
(setq emms-track-description-function 'emms-info-track-description)
(when (fboundp 'emms-cache) ; work around compiler warning
(emms-cache 1)))