From b1367cba38b88b64530f40b1935b38a8c08f2fd6 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 13 Oct 2012 17:37:25 +0800 Subject: [PATCH] Doc fix for url-http. * url-http.el (url-http): * url.el (url-retrieve-internal): Doc fix. Fixes: debbugs:6407 --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-http.el | 8 ++++++-- lisp/url/url.el | 12 +++++++----- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index c7fc4fcbfe1..f7fe5029afe 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2012-10-13 Chong Yidong + + * url-http.el (url-http): + * url.el (url-retrieve-internal): Doc fix (Bug#6407). + 2012-10-08 Glenn Morris * url-methods.el (url-scheme-get-property): url-https.el was diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 85b6efcde0d..73d53e08c59 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -1150,8 +1150,12 @@ the end of the document." (defun url-http (url callback cbargs &optional retry-buffer) "Retrieve URL via HTTP asynchronously. URL must be a parsed URL. See `url-generic-parse-url' for details. -When retrieval is completed, the function CALLBACK is executed with -CBARGS as the arguments. + +When retrieval is completed, execute the function CALLBACK, using +the arguments listed in CBARGS. The first element in CBARGS +should be a plist describing what has happened so far during the +request, as described in the docstring of `url-retrieve' (if in +doubt, specify nil). Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a previous `url-http' call, which is being re-attempted." diff --git a/lisp/url/url.el b/lisp/url/url.el index 87ae7a51aac..b219151a30c 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -131,9 +131,9 @@ characters are percent-encoded; see `url-encode-url'. CALLBACK is called when the object has been completely retrieved, with the current buffer containing the object, and any MIME headers associated with it. It is called as (apply CALLBACK STATUS CBARGS). -STATUS is a list with an even number of elements representing -what happened during the request, with most recent events first, -or an empty list if no events have occurred. Each pair is one of: +STATUS is a plist representing what happened during the request, +with most recent events first, or an empty list if no events have +occurred. Each pair is one of: \(:redirect REDIRECTED-TO) - the request was redirected to this URL \(:error (ERROR-SYMBOL . DATA)) - an error occurred. The error can be @@ -169,8 +169,10 @@ URL-encoded before it's used." (defun url-retrieve-internal (url callback cbargs &optional silent inhibit-cookies) "Internal function; external interface is `url-retrieve'. -CBARGS is what the callback will actually receive - the first item is -the list of events, as described in the docstring of `url-retrieve'. +CBARGS is the list of arguments that the callback function will +receive; its first element should be a plist specifying what has +happened so far during the request, as described in the docstring +of `url-retrieve' (if in doubt, specify nil). If SILENT, don't message progress reports and the like. If INHIBIT-COOKIES, cookies will neither be stored nor sent to -- 2.39.2