aboutsummaryrefslogtreecommitdiff
path: root/emms.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2007-02-23 04:01:00 +0000
committerMichael Olson <mwolson@gnu.org>2007-02-23 04:01:00 +0000
commit07827ace695e03d5494530fbf369e507c32c4688 (patch)
tree761784594d78d1e08d07dba82f8741b3c92d386c /emms.el
parent4cb782eaac1243423c82587729ccf5811b51841d (diff)
Move dictionary definitions higher to avoid compiler warning
darcs-hash:20070223040135-1bfb2-d3cb1425d6d67d9c6a43718a57fa8c04cc236ca9.gz
Diffstat (limited to 'emms.el')
-rw-r--r--emms.el60
1 files changed, 30 insertions, 30 deletions
diff --git a/emms.el b/emms.el
index 6a2f8cd..037f76c 100644
--- a/emms.el
+++ b/emms.el
@@ -487,6 +487,36 @@ See `emms-repeat-track'."
(require 'emms-compat)
+;;; Dictionaries
+
+;; This is a simple helper data structure, used by both players
+;; and tracks.
+
+(defsubst emms-dictionary (name)
+ "Create a new dictionary of type NAME."
+ (list name))
+
+(defsubst emms-dictionary-type (dict)
+ "Return the type of the dictionary DICT."
+ (car dict))
+
+(defun emms-dictionary-get (dict name &optional default)
+ "Return the value of NAME in DICT."
+ (let ((item (assq name (cdr dict))))
+ (if item
+ (cdr item)
+ default)))
+
+(defun emms-dictionary-set (dict name value)
+ "Set the value of NAME in DICT to VALUE."
+ (let ((item (assq name (cdr dict))))
+ (if item
+ (setcdr item value)
+ (setcdr dict (append (cdr dict)
+ (list (cons name value))))))
+ dict)
+
+
;;; Tracks
;; This is a simple datatype to store track information.
@@ -1338,35 +1368,5 @@ or negative to seek backwards."
(funcall seek seconds)
(run-hook-with-args 'emms-player-time-set-functions seconds)))))
-
-;;; Dictionaries
-
-;; This is a simple helper data structure, used by both players
-;; and tracks.
-
-(defsubst emms-dictionary (name)
- "Create a new dictionary of type NAME."
- (list name))
-
-(defsubst emms-dictionary-type (dict)
- "Return the type of the dictionary DICT."
- (car dict))
-
-(defun emms-dictionary-get (dict name &optional default)
- "Return the value of NAME in DICT."
- (let ((item (assq name (cdr dict))))
- (if item
- (cdr item)
- default)))
-
-(defun emms-dictionary-set (dict name value)
- "Set the value of NAME in DICT to VALUE."
- (let ((item (assq name (cdr dict))))
- (if item
- (setcdr item value)
- (setcdr dict (append (cdr dict)
- (list (cons name value))))))
- dict)
-
(provide 'emms)
;;; emms.el ends here