emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 bda3c46: Document 'url-user-agent'.


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 bda3c46: Document 'url-user-agent'.
Date: Sat, 26 Dec 2015 13:31:48 +0000

branch: emacs-25
commit bda3c4600b6866245308dd6008ffc3621e68e541
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Document 'url-user-agent'.
    
    * lisp/url/url-http.el (url-user-agent): Move from here...
    * lisp/url/url-vars.el (url-user-agent): ...to here.  This is to
    keep all the URL defcustoms in one place, and also have it defined
    whenever the URL library is loaded.
    
    * doc/misc/url.texi (Customization): Document 'url-user-agent'.
---
 doc/misc/url.texi    |    8 ++++++++
 etc/NEWS             |    1 +
 lisp/url/url-http.el |   11 -----------
 lisp/url/url-vars.el |   12 ++++++++++++
 4 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index cd2d7a1..121c28e 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -1330,6 +1330,14 @@ Connect directly.
 @end table
 @end defopt
 
address@hidden url-user-agent
+The User Agent string used for sending HTTP/HTTPS requests.  The value
+should be a string or a function of no arguments that returns a
+string.  The default value is @address@hidden: @var{package-name}
+URL/Emacs}}, where @var{package-name} is the value of
address@hidden and its version, if they are address@hidden
address@hidden defopt
+
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 @include doclicense.texi
diff --git a/etc/NEWS b/etc/NEWS
index 4bc66bd..547b3cc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -763,6 +763,7 @@ See the doc string of `sh-indent-after-continuation' for 
details.
 When `url-handler-mode' is enabled, file operations for these
 protocols as well as for "telnet" and "ftp" are passed to Tramp.
 
++++
 *** The URL package allows customizing the `url-user-agent' string.
 The new `url-user-agent' variable can be customized to be a string or
 a function.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a47d57d..b65affe 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -135,17 +135,6 @@ request.")
     (507 insufficient-storage            "Insufficient storage"))
   "The HTTP return codes and their text.")
 
-(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
-                                 (if url-package-name
-                                     (concat url-package-name "/"
-                                             url-package-version " ")
-                                   "") url-version)
-  "User Agent used by the URL package."
-  :type '(choice (string :tag "A static User-Agent string")
-                 (function :tag "Call a function to get the User-Agent 
string"))
-  :version "25.1"
-  :group 'url)
-
 ;(eval-when-compile
 ;; These are all macros so that they are hidden from external sight
 ;; when the file is byte-compiled.
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 46c2ec3..fa6f182 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -357,6 +357,18 @@ Currently supported methods:
                (const :tag "Direct connection" :value native))
   :group 'url-hairy)
 
+(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
+                                 (if url-package-name
+                                     (concat url-package-name "/"
+                                             url-package-version " ")
+                                   "") url-version)
+  "User Agent used by the URL package for HTTP/HTTPS requests
+Should be a string or a function of no arguments returning a string."
+  :type '(choice (string :tag "A static User-Agent string")
+                 (function :tag "Call a function to get the User-Agent 
string"))
+  :version "25.1"
+  :group 'url)
+
 (defvar url-setup-done nil "Has setup configuration been done?")
 
 (defconst url-weekday-alist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]