aboutsummaryrefslogtreecommitdiff
path: root/emms-browser.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-07-02 00:12:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-07-02 00:12:00 +0000
commitaccfde0f1a53e921406bb352fc5c3081ef9dbe97 (patch)
tree1f5db19af1e2cc9594782dc94df85bd18156f17f /emms-browser.el
parent6dfa85c0487668269d9f08543483aa1d4f4258ff (diff)
Make emms-cache and emms-browser work with XEmacs.
darcs-hash:20060702001247-1bfb2-987d207f3c007211aae68e8061a2a16fdc6960a7.gz
Diffstat (limited to 'emms-browser.el')
-rw-r--r--emms-browser.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/emms-browser.el b/emms-browser.el
index 76d4e58..d642575 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -127,7 +127,9 @@ adding an album, artist, etc."
:type 'function)
(defcustom emms-browser-comparison-test
- 'case-fold
+ (if (fboundp 'define-hash-table-test)
+ 'case-fold
+ 'equal)
"*A method for comparing entries in the cache.
The default is to compare case-insensitively."
:group 'emms-browser
@@ -396,7 +398,7 @@ compilations, etc."
(defun emms-browser-make-hash-by (type)
"Make a hash, mapping with TYPE, eg artist -> tracks."
(let ((hash (make-hash-table
- :test emms-browser-comparison-test))
+ :test emms-browser-comparison-test))
field existing-entry)
(maphash (lambda (path track)
(setq field (emms-browser-get-track-field track type))
@@ -422,8 +424,9 @@ compilations, etc."
(defun case-fold-string-hash (a)
(sxhash (upcase a)))
-(define-hash-table-test 'case-fold
- 'case-fold-string= 'case-fold-string-hash)
+(when (fboundp 'define-hash-table-test)
+ (define-hash-table-test 'case-fold
+ 'case-fold-string= 'case-fold-string-hash))
(defun emms-browser-insert-top-level-entry (name tracks type)
"Insert a single top level entry into the buffer."