diff options
author | Michael Olson <mwolson@gnu.org> | 2007-02-23 04:01:00 +0000 |
---|---|---|
committer | Michael Olson <mwolson@gnu.org> | 2007-02-23 04:01:00 +0000 |
commit | 07827ace695e03d5494530fbf369e507c32c4688 (patch) | |
tree | 761784594d78d1e08d07dba82f8741b3c92d386c | |
parent | 4cb782eaac1243423c82587729ccf5811b51841d (diff) |
Move dictionary definitions higher to avoid compiler warning
darcs-hash:20070223040135-1bfb2-d3cb1425d6d67d9c6a43718a57fa8c04cc236ca9.gz
-rw-r--r-- | emms.el | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -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 |