From 1e446de1aec47d258e509183d126d0341001900f Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 5 Jan 2007 03:40:00 +0000 Subject: emms-url: New file containing the url.el interaction routines from emms-lastfm.el. I plan to use these in other parts of EMMS as well. darcs-hash:20070105034035-1bfb2-d213da8dab318baf3fc5d6a1f7a3ac75d0e7640c.gz --- emms-lastfm.el | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'emms-lastfm.el') diff --git a/emms-lastfm.el b/emms-lastfm.el index 3758a8b..48c2699 100644 --- a/emms-lastfm.el +++ b/emms-lastfm.el @@ -488,25 +488,5 @@ x=17" (when (re-search-forward (concat "^" key "=") nil t) (buffer-substring-no-properties (point) (line-end-position)))) -(defun url-escape (url) - "Escapes SPACEs with %20." - (replace-regexp-in-string " " "%20" url)) - -(defun http-content-coding () - (and (boundp 'url-http-content-type) - (string-match ";\\s-*charset=\\([^;[:space:]]+\\)" url-http-content-type) - (intern-soft (downcase (match-string 1 url-http-content-type))) )) - -(defun http-decode-buffer () - "Recode the buffer with `url-retrieve's contents. Else the -buffer would contain multibyte chars like \\123\\456." - (let* ((default (or (car default-process-coding-system) 'utf-8) ) - (coding (or (http-content-coding) default)) ) - ;; (pop-to-buffer (current-buffer)) - ;; (message "content-type: %s" url-http-content-type) - ;; (message "coding: %S [default: %S]" coding default) - (set-buffer-multibyte t) - (decode-coding-region (point-min) (point-max) coding))) - (provide 'emms-lastfm) ;;; emms-lastfm.el ends here -- cgit v1.2.3