aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-07-09 03:34:15 +0200
committerLars Ingebrigtsen2019-07-09 03:44:13 +0200
commit84047666a7e04dab959ab4e6d471d2677bc31dac (patch)
treeb05e423119f40594cb8e2e98137617b5c9a32f2e
parent733f30b4cb3ab3dda8a4a59bd9cb224bb01048de (diff)
downloademacs-84047666a7e04dab959ab4e6d471d2677bc31dac.tar.gz
emacs-84047666a7e04dab959ab4e6d471d2677bc31dac.zip
Remove compat code in url-mime-charset-string
* lisp/url/url-vars.el (url-mime-charset-string): Remove compat code.
-rw-r--r--lisp/url/url-vars.el22
1 files changed, 9 insertions, 13 deletions
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index ae1d6e54391..28f876554bb 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -249,26 +249,22 @@ Should be an assoc list of headers/contents.")
249 "String to send in the Accept-encoding: field in HTTP requests.") 249 "String to send in the Accept-encoding: field in HTTP requests.")
250 250
251(defvar mm-mime-mule-charset-alist) 251(defvar mm-mime-mule-charset-alist)
252(declare-function mm-coding-system-p "mm-util" (cs))
253 252
254;; Perhaps the first few should actually be given decreasing `q's and 253;; Perhaps the first few should actually be given decreasing `q's and
255;; the list should be trimmed significantly. 254;; the list should be trimmed significantly.
256;; Fixme: do something sane if we don't have `sort-coding-systems'
257;; (Emacs 20, XEmacs).
258(defun url-mime-charset-string () 255(defun url-mime-charset-string ()
259 "Generate a list of preferred MIME charsets for HTTP requests. 256 "Generate a list of preferred MIME charsets for HTTP requests.
260Generated according to current coding system priorities." 257Generated according to current coding system priorities."
261 (require 'mm-util) 258 (require 'mm-util)
262 (if (fboundp 'sort-coding-systems) 259 (let ((ordered (sort-coding-systems
263 (let ((ordered (sort-coding-systems 260 (let (accum)
264 (let (accum) 261 (dolist (elt mm-mime-mule-charset-alist)
265 (dolist (elt mm-mime-mule-charset-alist) 262 (if (coding-system-p (car elt))
266 (if (mm-coding-system-p (car elt)) 263 (push (car elt) accum)))
267 (push (car elt) accum))) 264 (nreverse accum)))))
268 (nreverse accum))))) 265 (concat (format "%s;q=1, " (pop ordered))
269 (concat (format "%s;q=1, " (pop ordered)) 266 (mapconcat 'symbol-name ordered ";q=0.5, ")
270 (mapconcat 'symbol-name ordered ";q=0.5, ") 267 ";q=0.5")))
271 ";q=0.5"))))
272 268
273(defvar url-mime-charset-string nil 269(defvar url-mime-charset-string nil
274 "String to send in the Accept-charset: field in HTTP requests. 270 "String to send in the Accept-charset: field in HTTP requests.