aboutsummaryrefslogtreecommitdiff
path: root/lisp/emms-url.el
diff options
context:
space:
mode:
authorRasmus <rasmus@gmx.us>2015-05-19 16:36:41 +0200
committerRasmus <rasmus@gmx.us>2015-05-19 16:36:41 +0200
commit55ff581b1e7d8b0b290834e87221baadd95db1ff (patch)
treef131238e1510d70a7535518b28e5803259a1d2ac /lisp/emms-url.el
parent167d1efabfcffb5e1e2aacc8dcb7225d33eb4b32 (diff)
emms-url: add emms-url-quote-underscore
The function is used in emms-lyrics, but was not commited previously.
Diffstat (limited to 'lisp/emms-url.el')
-rw-r--r--lisp/emms-url.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emms-url.el b/lisp/emms-url.el
index 66c87bc..59d5cfa 100644
--- a/lisp/emms-url.el
+++ b/lisp/emms-url.el
@@ -84,6 +84,11 @@ e.g.,
(emms-replace-regexp-in-string
" " "+" (emms-url-quote s (concat safe " "))))
+(defun emms-url-quote-underscore (s &optional safe)
+ "Run (emms-url-quote s \" \"), then replace ` ' with `_'."
+ (emms-replace-regexp-in-string
+ " " "_" (emms-url-quote s (concat safe " "))))
+
(defun emms-http-content-coding ()
(save-match-data
(and (boundp 'url-http-content-type)