diff options
-rw-r--r-- | emms-history.el | 3 | ||||
-rw-r--r-- | emms-i18n.el | 36 | ||||
-rw-r--r-- | emms-lastfm.el | 4 | ||||
-rw-r--r-- | emms-mark.el | 4 | ||||
-rw-r--r-- | emms-playlist-mode.el | 3 | ||||
-rw-r--r-- | emms-tag-editor.el | 7 |
6 files changed, 31 insertions, 26 deletions
diff --git a/emms-history.el b/emms-history.el index cd74681..42071b2 100644 --- a/emms-history.el +++ b/emms-history.el @@ -46,8 +46,7 @@ (let ((oldbuf emms-playlist-buffer) emms-playlist-buffer playlists) (save-excursion - (dolist (buf (remove-if-not 'buffer-live-p - (emms-playlist-buffer-list))) + (dolist (buf (emms-playlist-buffer-list)) (set-buffer buf) (when (> (buffer-size) 0) ; make sure there is track in the buffer (setq emms-playlist-buffer buf diff --git a/emms-i18n.el b/emms-i18n.el index 52e315a..c5792aa 100644 --- a/emms-i18n.el +++ b/emms-i18n.el @@ -45,6 +45,25 @@ (eval-when-compile (require 'cl)) +;; TODO: Change these to use defcustom + +(defvar emms-nerver-used-coding-system + '(raw-text undecided) + "If the `emms-coding-dectect-functions' return coding system in +this list, use `emms-default-coding-system' instead.") + +(defvar emms-coding-system-for-read 'utf-8 + "If coding detect failed, use this for decode") + +(defvar emms-default-coding-system nil + "If non-nil, used for decode and encode") + +(defvar emms-coding-dectect-functions nil + "A list of function to call to detect codings") + +(defvar emms-detect-max-size 10000 + "Max bytes to detect coding system. Nil mean scan whole buffer.") + (defun emms-iconv (from to str) "Convert STR from FROM coding to TO coding." (if (and from to) @@ -118,23 +137,6 @@ otherwise, it is pass all parameter to `call-process'." (process-coding-system-alist nil)) (apply 'call-process args)) (apply 'call-process args)))) - -(defvar emms-nerver-used-coding-system - '(raw-text undecided) - "If the `emms-coding-dectect-functions' return coding system in -this list, use `emms-default-coding-system' instead.") - -(defvar emms-coding-system-for-read 'utf-8 - "If coding detect failed, use this for decode") - -(defvar emms-default-coding-system nil - "If non-nil, used for decode and encode") - -(defvar emms-coding-dectect-functions nil - "A list of function to call to detect codings") - -(defvar emms-detect-max-size 10000 - "Max bytes to detect coding system. Nil mean scan whole buffer.") (defun emms-detect-coding-function (size) (detect-coding-region (point) diff --git a/emms-lastfm.el b/emms-lastfm.el index c4e6703..1dcf9db 100644 --- a/emms-lastfm.el +++ b/emms-lastfm.el @@ -46,6 +46,7 @@ ;; needed. (require 'url) +(require 'emms) (defvar emms-lastfm-username "" "Your last.fm username") @@ -62,6 +63,7 @@ procedure. Only for internal use.") ;; used internally (defvar emms-lastfm-buffer nil "-- only used internally --") +(defvar emms-lastfm-process nil "-- only used internally --") (defvar emms-lastfm-md5-challenge nil "-- only used internally --") (defvar emms-lastfm-submit-url nil "-- only used internally --") (defvar emms-lastfm-current-track nil "-- only used internally --") @@ -157,7 +159,7 @@ well or if an error occured." (if (not (string-match (rx (or "UPTODATE""UPDATE")) response)) (progn (cond ((string-match "FAILED" response) - (message "EMMS: Handshake failed: %s.") response) + (message "EMMS: Handshake failed: %s." response)) ((string-match "BADUSER" response) (message "EMMS: Wrong username.")))) (when (string-match "UPDATE" response) diff --git a/emms-mark.el b/emms-mark.el index 9d71cef..1d59c5e 100644 --- a/emms-mark.el +++ b/emms-mark.el @@ -31,6 +31,7 @@ (provide 'emms-mark) (require 'emms) +(require 'emms-playlist-mode) (eval-when-compile (require 'cl)) @@ -66,8 +67,7 @@ description function.") emms-track-description-function 'emms-mark-track-description) (emms-with-inhibit-read-only-t (save-excursion - (dolist (buf (remove-if-not 'buffer-live-p - (emms-playlist-buffer-list))) + (dolist (buf (emms-playlist-buffer-list)) (set-buffer buf) (let ((tracks (nreverse (emms-playlist-tracks-in-region (point-min) diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el index 0562fee..c0e789f 100644 --- a/emms-playlist-mode.el +++ b/emms-playlist-mode.el @@ -500,8 +500,7 @@ WINDOW-WIDTH should be a positive integer." (defun emms-playlist-mode-next (arg) "Navigate between playlists." (interactive "p") - (let ((playlists (remove-if-not 'buffer-live-p - (emms-playlist-buffer-list))) + (let ((playlists (emms-playlist-buffer-list)) bufs idx) (if playlists ;; if not in playlist mode, switch to emms-playlist-buffer diff --git a/emms-tag-editor.el b/emms-tag-editor.el index 5337910..5bfb3ee 100644 --- a/emms-tag-editor.el +++ b/emms-tag-editor.el @@ -348,8 +348,11 @@ edit buffer." (funcall emms-playlist-update-track-function)) ;; clear modified tag (emms-track-set track 'tag-modified nil)))) - (if (and need-sync (y-or-n-p "You have change some track names, sync the cache? ")) - (emms-cache-sync)) + (if (and (featurep 'emms-cache) + need-sync + (y-or-n-p "You have change some track names, sync the cache? ")) + (and (fboundp 'emms-cache-sync) ; silence byte-compiler + (emms-cache-sync))) (emms-tag-editor-display-log-buffer-maybe) (message "Set all mp3 tag done!"))) (if arg (bury-buffer))) |