aboutsummaryrefslogtreecommitdiff
path: root/emms-browser.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-06-08 18:46:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-06-08 18:46:00 +0000
commitececf6862bde0815211e5596c7a8cf76304b11f5 (patch)
treeef675f6d765434df52b266331e02c6ece0f5dc4e /emms-browser.el
parent5e88f995fec0d274da36801cb97052959b928bcd (diff)
Fix compiler warnings in emms-cache.el.
darcs-hash:20060608184612-1bfb2-942ae7db648d88b9dfe4896872fc3f5fdd7a30d3.gz
Diffstat (limited to 'emms-browser.el')
-rw-r--r--emms-browser.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/emms-browser.el b/emms-browser.el
index 0aa7faa..e96c707 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -58,7 +58,9 @@
;;; Code:
+(require 'emms)
(require 'emms-cache)
+(require 'emms-source-file)
;; --------------------------------------------------
;; Variables and configuration
@@ -307,8 +309,9 @@ example function is `emms-browse-by-artist'."
(when emms-browser-sort-function
(with-current-emms-playlist
(setq new-max (point-max)))
- (emms-playlist-sort 'emms-sort-natural-order-less-p
- old-max new-max))
+ (when (fboundp 'emms-playlist-sort)
+ (emms-playlist-sort emms-browser-sort-function
+ old-max new-max)))
(run-mode-hooks 'emms-browser-tracks-added-hook)
(message "Added %d tracks." count)))
@@ -430,11 +433,12 @@ Returns the playlist window."
(setq pbuf (emms-playlist-current-clear))
(switch-to-buffer pbuf))
;; make q in the playlist window hide the linked browser
- (define-key emms-playlist-mode-map (kbd "q")
- (lambda ()
- (interactive)
- (emms-browser-hide-linked-window)
- (bury-buffer)))
+ (when (boundp 'emms-playlist-mode-map)
+ (define-key emms-playlist-mode-map (kbd "q")
+ (lambda ()
+ (interactive)
+ (emms-browser-hide-linked-window)
+ (bury-buffer))))
(setq pwin (get-buffer-window pbuf))
(goto-char (point-max))))
pwin))