From 07827ace695e03d5494530fbf369e507c32c4688 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 23 Feb 2007 04:01:00 +0000 Subject: Move dictionary definitions higher to avoid compiler warning darcs-hash:20070223040135-1bfb2-d3cb1425d6d67d9c6a43718a57fa8c04cc236ca9.gz --- emms.el | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/emms.el b/emms.el index 6a2f8cd..037f76c 100644 --- a/emms.el +++ b/emms.el @@ -486,6 +486,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 @@ -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 -- cgit v1.2.3