[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/xml-rpc 4fd5a03a36 36/64: xml-rpc.el: fix up callbacks for
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/xml-rpc 4fd5a03a36 36/64: xml-rpc.el: fix up callbacks for post emacs20! |
Date: |
Fri, 31 Dec 2021 20:11:07 -0500 (EST) |
branch: elpa/xml-rpc
commit 4fd5a03a36889f8dc4cb41ef93a2629040bef2c3
Author: Alex Bennée <alex.bennee@linaro.org>
Commit: Alex Bennée <alex.bennee@linaro.org>
xml-rpc.el: fix up callbacks for post emacs20!
I'm actually testing this on Emacs 24 but it's manifestly wrong to get
url-retrieve to call the callback function directly. We need to process
the XML response first. As the call back function seem different I
wrapped it in a new handler.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
xml-rpc.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/xml-rpc.el b/xml-rpc.el
index 02e03ea979..bfc21f880d 100644
--- a/xml-rpc.el
+++ b/xml-rpc.el
@@ -592,7 +592,9 @@ or nil if called with ASYNC-CALLBACK-FUNCTION."
result)))
(t ; Post emacs20 w3-el
(if async-callback-function
- (url-retrieve server-url async-callback-function)
+ (let ((cbargs (list async-callback-function)))
+ (url-retrieve server-url
+ 'xml-new-rpc-request-callback-handler
cbargs))
(let ((buffer (url-retrieve-synchronously server-url)))
(with-current-buffer buffer
(when (not (numberp url-http-response-status))
@@ -694,6 +696,12 @@ handled from XML-BUFFER."
(funcall callback-fun (xml-rpc-xml-to-response xml-response))))
+(defun xml-new-rpc-request-callback-handler (status callback-fun)
+ "Handle a new style `url-retrieve' callback passing `STATUS' and
`CALLBACK-FUN'."
+ (let ((xml-buffer (current-buffer)))
+ (xml-rpc-request-callback-handler callback-fun xml-buffer)))
+
+
(defun xml-rpc-method-call-async (async-callback-func server-url method
&rest params)
"Call an XML-RPC method asynchronously at SERVER-URL named METHOD with \
- [nongnu] elpa/xml-rpc 481ed72dff 22/64: update bug reporting function., (continued)
- [nongnu] elpa/xml-rpc 481ed72dff 22/64: update bug reporting function., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc c20aa6359a 29/64: bump version for continued development, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 25c380cab0 28/64: Update release notes, tag 1.6.8, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 3b4ac0ebf2 24/64: update urls, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 4b21d27d35 25/64: Eliminate xemacs compile warning, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 643bbfb5da 30/64: * Apply link from http://rix3.8.je/2009/12/15/emacs%E7%9A%84weblogger1-4-4%E7%9A%84wordpress-patch/, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 79e74a969d 21/64: Some minor housekeeping, bump xml-rpc.el version., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc f862301b46 27/64: connection close! connection close!, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 445fc70355 33/64: point to upstream in comments, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 8f624f8b96 44/64: Merge pull request #8 from larsmagne/master, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 4fd5a03a36 36/64: xml-rpc.el: fix up callbacks for post emacs20!,
Stefan Kangas <=
- [nongnu] elpa/xml-rpc e4002b8502 40/64: Really fix struct detection., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 0ab093d601 42/64: Bump version number, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 47007ef094 54/64: Merge pull request #14 from skangas/libxml-parse-xml-region, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc ff1e22959f 50/64: Merge pull request #16 from skangas/byte-compiler-warnings, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc bd359a86b1 47/64: Use libxml-parse-xml-region when available, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 31890fef63 60/64: Remove versions that don't have skip-unless, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc a2cb50528c 57/64: Tidy up a bit; remove code that shouldn't be needed in modern emacs, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc eb50e8b116 62/64: formatting, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc a876849b45 59/64: Merge pull request #18 from skangas/fix-unit-test, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 8020ccd176 64/64: Badge++ and version bump, Stefan Kangas, 2021/12/31