From: Lars Ingebrigtsen Date: Tue, 1 Mar 2016 03:49:26 +0000 (+1100) Subject: Allow binding `url-mime-accept-string' X-Git-Tag: emacs-25.0.92~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c1e6ebfcb98f7936110f581075bff993c64aa18;p=emacs.git Allow binding `url-mime-accept-string' * lisp/url/url-http.el (url-http): Allow binding `url-mime-accept-string' (bug#22855). Backport: (cherry picked from commit 144bb0cf322b9756d29def3e27a42303e2edce43) --- diff --git a/etc/NEWS b/etc/NEWS index ecbc4ef248e..c9d0b99ba62 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -927,6 +927,10 @@ a function. to specify that we're running in a noninteractive context, and that we should not be queried about things like TLS certificate validity. +--- +*** `url-mime-accept-string' can now be used as in "interface" +variable, meaning you can bind it around an `url-retrieve' call. + --- *** If URL is used with a https connection, the first callback argument plist will contain a :peer element that has the output of diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index c79e7645d92..5832e92c5a3 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1213,6 +1213,7 @@ overriding the value of `url-gateway-method'." (and (boundp 'url-http-noninteractive) url-http-noninteractive))) (connection (url-http-find-free-connection host port gateway-method)) + (mime-accept-string url-mime-accept-string) (buffer (or retry-buffer (generate-new-buffer (format " *http %s:%d*" host port))))) @@ -1248,6 +1249,7 @@ overriding the value of `url-gateway-method'." url-http-target-url url-http-no-retry url-http-connection-opened + url-mime-accept-string url-http-proxy)) (set (make-local-variable var) nil)) @@ -1265,6 +1267,7 @@ overriding the value of `url-gateway-method'." url-http-target-url url-current-object url-http-no-retry retry-buffer url-http-connection-opened nil + url-mime-accept-string mime-accept-string url-http-proxy url-using-proxy) (set-process-buffer connection buffer)